ignite-spring-boot-thin-client : failed to start the application with ignite initialization failure

356 views Asked by At

Please help....

        <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>demo</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>11</java.version>
        <ignite.version>2.7.0</ignite.version>
        <h2.version>1.4.197</h2.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
<dependency>
    <groupId>org.apache.ignite</groupId>
    <artifactId>ignite-core</artifactId>
    <version>${ignite.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.ignite</groupId>
    <artifactId>ignite-spring</artifactId>
    <version>${ignite.version}</version>
</dependency>
        <dependency>
            <groupId>org.apache.ignite</groupId>
            <artifactId>ignite-spring-data_2.2</artifactId>
            <version>2.9.1</version>
        </dependency>
        <dependency>
    <groupId>org.apache.ignite</groupId>
  <artifactId>ignite-spring-boot-thin-client-autoconfigure-ext</artifactId>
  <version>1.0.0</version>
</dependency>
<dependency>
    <groupId>org.apache.ignite</groupId>
    <artifactId>ignite-indexing</artifactId>
    <version>2.0.0</version>
</dependency>
    </dependencies>



Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ignite.Ignite]: Factory method 'ignite' threw exception; nested exception is java.lang.ExceptionInInitializerError
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.3.jar:5.3.3]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.3.jar:5.3.3]
    ... 20 common frames omitted
Caused by: java.lang.ExceptionInInitializerError: null
    at org.apache.ignite.internal.util.IgniteUtils.<clinit>(IgniteUtils.java:795) ~[ignite-core-2.7.0.jar:2.7.0]
    at org.apache.ignite.internal.IgnitionEx.<clinit>(IgnitionEx.java:209) ~[ignite-core-2.7.0.jar:2.7.0]


Caused by: java.lang.RuntimeException: jdk.internal.misc.JavaNioAccess class is unavailable.
    at org.apache.ignite.internal.util.GridUnsafe.javaNioAccessObject(GridUnsafe.java:1453) ~[ignite-core-2.7.0.jar:2.7.0]
    at org.apache.ignite.internal.util.GridUnsafe.<clinit>(GridUnsafe.java:112) ~[ignite-core-2.7.0.jar:2.7.0]
    ... 35 common frames omitted
Caused by: java.lang.ClassNotFoundException: jdk.internal.misc.SharedSecrets
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]
    at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
    at java.base/java.lang.Class.forName(Class.java:315) ~[na:na]
1

There are 1 answers

0
alamar On

I'm not sure that Ignite 2.7 supports Java 11. You can try adding the Java 9+ JVM options from the documentation, though:

--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