vert-x3 / vertx-ignite

Apache License 2.0
34 stars 28 forks source link

java.lang.NoClassDefFoundError: sun/misc/SharedSecrets for JDK11 #80

Closed iseki0 closed 4 years ago

iseki0 commented 4 years ago

I get this Exception:

java.lang.NoClassDefFoundError: sun/misc/SharedSecrets

Following the Ignite 's docs I add VM options:

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

But it's not working. Should I add any options to build.gradle ? Thank you

JohnMcWaggy commented 4 years ago

You can work around this issue for now by updating the versions of the Apache Ignite packages that are consumed by your project. The issue seems to be that older versions of Ignite (2.3.0 used by this package) do not support Java9-11, while newer versions of Ignite do. For my project, I fixed this issue by adding the following to my POM (Maven). You could try a similar thing in Gradle.

 <dependency>
      <groupId>org.apache.ignite</groupId>
      <artifactId>ignite-core</artifactId>
      <version>2.8.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.ignite</groupId>
      <artifactId>ignite-spring</artifactId>
      <version>2.8.0</version>
      <exclusions>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-aop</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-tx</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-jdbc</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
tsegismont commented 4 years ago

This will be fixed by upgrading to 2.8.0, see #82

iseki0 commented 4 years ago

Thanks for your reply. I will wait for update.

在 2020/4/23 16:27, Thomas Segismont 写道:

This will be fixed by upgrading to 2.8.0, see #82 https://github.com/vert-x3/vertx-ignite/pull/82

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-ignite/issues/80#issuecomment-618258956, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADINZHBSMJ3HOMSTWUPAOWLRN73XLANCNFSM4KAQHDLQ.