oracle / graal

GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
https://www.graalvm.org
Other
20.45k stars 1.64k forks source link

Class Not found javax.security.jacc.PolicyConfiguration #643

Closed MrThreepwood closed 4 years ago

MrThreepwood commented 6 years ago

Hey, I'm having some issues getting a fairly simple Spark API building (still includes Hibernate for DB access, so not super simple), but I'm running into this error

Caused by: java.lang.ClassNotFoundException: javax.security.jacc.PolicyConfiguration
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at jdk.vm.ci.hotspot.CompilerToVM.lookupType(Native Method)
    at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.lookupType(HotSpotJVMCIRuntime.java:456)
    ... 22 more

Seems fairly straight forward, except that I can't seem to find it myself. The dependency tree I see doesn't include it, but if I had to guess would be related to jetty, which seems to be what your build server is running. Any additional setup I need with Spark/Jetty? I have confirmed that the jar I'm trying to convert runs on it's own and does what I expect.

+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.60
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.2.60
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.2.60
|    |    \--- org.jetbrains:annotations:13.0
|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.60
|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.2.60 (*)
+--- org.jetbrains.kotlin:kotlin-reflect:1.2.60
|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.2.60 (*)
+--- org.hibernate:hibernate-hikaricp:5.2.16.Final
|    +--- org.jboss.logging:jboss-logging:3.3.1.Final
|    +--- org.hibernate:hibernate-core:5.2.16.Final
|    |    +--- org.jboss.logging:jboss-logging:3.3.1.Final
|    |    +--- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final
|    |    +--- org.javassist:javassist:3.22.0-GA
|    |    +--- antlr:antlr:2.7.7
|    |    +--- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.0.1.Final
|    |    +--- org.jboss:jandex:2.0.3.Final
|    |    +--- com.fasterxml:classmate:1.3.0
|    |    +--- dom4j:dom4j:1.6.1
|    |    \--- org.hibernate.common:hibernate-commons-annotations:5.0.1.Final
|    |         \--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.1.Final
|    \--- com.zaxxer:HikariCP:2.5.1 -> 2.6.1
|         \--- org.slf4j:slf4j-api:1.7.22
+--- com.zaxxer:HikariCP:2.6.1 (*)
+--- com.sparkjava:spark-core:2.7.1
|    +--- org.slf4j:slf4j-api:1.7.13 -> 1.7.22
|    +--- org.eclipse.jetty:jetty-server:9.4.6.v20170531
|    |    +--- javax.servlet:javax.servlet-api:3.1.0
|    |    +--- org.eclipse.jetty:jetty-http:9.4.6.v20170531
|    |    |    +--- org.eclipse.jetty:jetty-util:9.4.6.v20170531
|    |    |    \--- org.eclipse.jetty:jetty-io:9.4.6.v20170531
|    |    |         \--- org.eclipse.jetty:jetty-util:9.4.6.v20170531
|    |    \--- org.eclipse.jetty:jetty-io:9.4.6.v20170531 (*)
|    +--- org.eclipse.jetty:jetty-webapp:9.4.6.v20170531
|    |    +--- org.eclipse.jetty:jetty-xml:9.4.6.v20170531
|    |    |    \--- org.eclipse.jetty:jetty-util:9.4.6.v20170531
|    |    \--- org.eclipse.jetty:jetty-servlet:9.4.6.v20170531
|    |         \--- org.eclipse.jetty:jetty-security:9.4.6.v20170531
|    |              \--- org.eclipse.jetty:jetty-server:9.4.6.v20170531 (*)
|    +--- org.eclipse.jetty.websocket:websocket-server:9.4.6.v20170531
|    |    +--- org.eclipse.jetty.websocket:websocket-common:9.4.6.v20170531
|    |    |    +--- org.eclipse.jetty.websocket:websocket-api:9.4.6.v20170531
|    |    |    +--- org.eclipse.jetty:jetty-util:9.4.6.v20170531
|    |    |    \--- org.eclipse.jetty:jetty-io:9.4.6.v20170531 (*)
|    |    +--- org.eclipse.jetty.websocket:websocket-client:9.4.6.v20170531
|    |    |    +--- org.eclipse.jetty:jetty-util:9.4.6.v20170531
|    |    |    +--- org.eclipse.jetty:jetty-io:9.4.6.v20170531 (*)
|    |    |    +--- org.eclipse.jetty:jetty-client:9.4.6.v20170531
|    |    |    |    +--- org.eclipse.jetty:jetty-http:9.4.6.v20170531 (*)
|    |    |    |    \--- org.eclipse.jetty:jetty-io:9.4.6.v20170531 (*)
|    |    |    \--- org.eclipse.jetty.websocket:websocket-common:9.4.6.v20170531 (*)
|    |    +--- org.eclipse.jetty.websocket:websocket-servlet:9.4.6.v20170531
|    |    |    +--- org.eclipse.jetty.websocket:websocket-api:9.4.6.v20170531
|    |    |    \--- javax.servlet:javax.servlet-api:3.1.0
|    |    +--- org.eclipse.jetty:jetty-servlet:9.4.6.v20170531 (*)
|    |    \--- org.eclipse.jetty:jetty-http:9.4.6.v20170531 (*)
|    \--- org.eclipse.jetty.websocket:websocket-servlet:9.4.6.v20170531 (*)
+--- com.sparkjava:spark-kotlin:1.0.0-alpha
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.1.2-2 -> 1.2.60 (*)
|    \--- com.sparkjava:spark-core:2.6.0 -> 2.7.1 (*)
+--- com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0
|    +--- com.fasterxml.jackson.core:jackson-databind:2.9.0
|    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
|    |    \--- com.fasterxml.jackson.core:jackson-core:2.9.0
|    +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
|    \--- org.jetbrains.kotlin:kotlin-reflect:1.1.3 -> 1.2.60 (*)
+--- org.koin:koin-core:0.8.0
|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.1.61 -> 1.2.60 (*)
+--- io.grpc:grpc-netty:1.9.0
|    +--- io.grpc:grpc-core:[1.9.0] -> 1.9.0
|    |    +--- io.grpc:grpc-context:1.9.0
|    |    +--- com.google.guava:guava:19.0
|    |    +--- com.google.errorprone:error_prone_annotations:2.1.2
|    |    +--- com.google.code.findbugs:jsr305:3.0.0
|    |    +--- com.google.instrumentation:instrumentation-api:0.4.3
|    |    |    +--- com.google.code.findbugs:jsr305:3.0.0
|    |    |    \--- com.google.guava:guava:19.0
|    |    +--- io.opencensus:opencensus-api:0.10.0
|    |    |    +--- com.google.errorprone:error_prone_annotations:2.1.2
|    |    |    \--- com.google.guava:guava:19.0
|    |    \--- io.opencensus:opencensus-contrib-grpc-metrics:0.10.0
|    |         +--- com.google.errorprone:error_prone_annotations:2.1.2
|    |         \--- io.opencensus:opencensus-api:0.10.0 (*)
|    +--- io.netty:netty-codec-http2:[4.1.17.Final] -> 4.1.17.Final
|    |    +--- io.netty:netty-codec-http:4.1.17.Final
|    |    |    \--- io.netty:netty-codec:4.1.17.Final
|    |    |         \--- io.netty:netty-transport:4.1.17.Final
|    |    |              +--- io.netty:netty-buffer:4.1.17.Final
|    |    |              |    \--- io.netty:netty-common:4.1.17.Final
|    |    |              \--- io.netty:netty-resolver:4.1.17.Final
|    |    |                   \--- io.netty:netty-common:4.1.17.Final
|    |    \--- io.netty:netty-handler:4.1.17.Final
|    |         +--- io.netty:netty-buffer:4.1.17.Final (*)
|    |         +--- io.netty:netty-transport:4.1.17.Final (*)
|    |         \--- io.netty:netty-codec:4.1.17.Final (*)
|    \--- io.netty:netty-handler-proxy:4.1.17.Final
|         +--- io.netty:netty-transport:4.1.17.Final (*)
|         +--- io.netty:netty-codec-socks:4.1.17.Final
|         |    \--- io.netty:netty-codec:4.1.17.Final (*)
|         \--- io.netty:netty-codec-http:4.1.17.Final (*)
+--- io.grpc:grpc-stub:1.9.0
|    \--- io.grpc:grpc-core:1.9.0 (*)
+--- io.nats:java-nats-streaming:0.5.0
+--- org.slf4j:slf4j-simple:1.7.21
|    \--- org.slf4j:slf4j-api:1.7.21 -> 1.7.22
+--- org.jetbrains.kotlinx:kotlinx-coroutines-core:0.21
|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.2.10 -> 1.2.60 (*)
+--- org.hibernate:hibernate-core:5.2.16.Final (*)
+--- mysql:mysql-connector-java:6.0.+ -> 6.0.6
\--- junit:junit:4.12
     \--- org.hamcrest:hamcrest-core:1.3
cstancu commented 6 years ago

Can you paste the complete stack trace? Are you getting this issue when trying to use native-image?