Troubleshooting

Expand all | Collapse all

Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or above. Current Java version is not supported: 11

Jump to Best Answer
  • 1.  Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or above. Current Java version is not supported: 11

    Posted 14 days ago
    Hi, I have imported the GG CE Maven project "gridgain-advanced-examples"into Eclipse, and believe I have run the Run As Maven clean and build with no errors. But when I try to run the ExampleNodeStart.java program, I get an error that current Java version 11.04 is not supported. This sounds wrong so I assume that I have misconfigured something.

    Here is the exception:

    Exception in thread "main" java.lang.ExceptionInInitializerErrorException in thread "main" java.lang.ExceptionInInitializerError at org.apache.ignite.Ignition.start(Ignition.java:347) at org.gridgain.examples.ExampleNodeStartup.main(ExampleNodeStartup.java:34)Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or above. Current Java version is not supported: 11 at org.apache.ignite.internal.IgnitionEx.<clinit>(IgnitionEx.java:184) ... 2 more

    I have this version of Java installed:

    ken@ken-HP-EliteBook-8530w:~$ java -version
    openjdk version "11.0.4" 2019-07-16
    OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)
    OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing)

    ------------------------------
    Ken Cottrell
    SA
    Independent
    ------------------------------


  • 2.  RE: Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or above. Current Java version is not supported: 11
    Best Answer

    Posted 13 days ago

    Hi Ken,

    Running Gridgain with java of version >8 requires the additional configuration:

    https://docs.gridgain.com/docs#section-running-gridgain-with-java-9-10-11

    When you start Gridgain via ignite.sh and ignite.bat then these recommendations will be applied automatically. But when you start it via maven project then you should add required JVM options to your java application run command:

    --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED 
    --add-exports=java.base/sun.nio.ch=ALL-UNNAMED 
    --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED 
    --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
    --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED
    --illegal-access=permit
    -Djdk.tls.client.protocols=TLSv1.2


    Please try these options and check again.

    BR,
    Andrei



    ------------------------------
    Andrei Alexsandrov
    Developer
    GridGain
    ------------------------------



  • 3.  RE: Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or above. Current Java version is not supported: 11

    Posted 13 days ago
    Thank Andrei, I entered your settings into the Eclipse [Run Configurations | Arguments] tab and things seem ok now. 

    I still get this warning when I run the ClientPutGetExample in my version of Eclipse (4.11.1) - but the programs do run ok it seems.

    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by org.apache.ignite.internal.util.GridUnsafe$2 (file:/home/ken/.m2/repository/org/gridgain/ignite-core/8.7.6/ignite-core-8.7.6.jar) to field java.nio.Buffer.address
    WARNING: Please consider reporting this to the maintainers of org.apache.ignite.internal.util.GridUnsafe$2
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release

    >>> Thin client put-get example started.
    >>> Created cache [put-get-example].
    >>> Saved [Address [street=1545 Jackson Street, zip=94612]] in the cache.
    >>> Loaded [Address [street=1545 Jackson Street, zip=94612]] from the cache.

     
    Ken Cottrell
    Mobile: 214-546-5100
    Private Email:    cottrell.ken@gmail.com





  • 4.  RE: Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or above. Current Java version is not supported: 11

     
    Posted 12 days ago
    Ken,

    Those warning messages are innocuous. It means that Ignite/GridGain uses the APIs that are hidden deep in JVM. We use those APIs for memory management needs.

    Btw, what's your GridGain version? The message below is not printed in the latest versions:

    java.lang.IllegalStateException: Ignite requires Java 7 or above. Current Java version is not supported: 11 at org.apache.ignite.internal..<clinit>(IgnitionEx.java:184) ... 2 more

    ------------------------------
    Denis
    ------------------------------



Would you attend a July Meetup?


Announcements

  • Welcome to the new GridGain Forums!

    Hello and welcome to the new GridGain Forums. This is the place to ask questions, get or give advice and connect with your peers. GridGain experts regularly monitor these posts and can also help solve your issues.