-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build a bundle jar with Jersey+Jetty+CDI #2075
Comments
You should enable security services with |
Thanks, it's progressing :-) I also get the warning |
That type's no-parameter constructor needs to be registered for reflection. You can also use the
It's the native image build server, i.e., a compilation server that speeds up builds by keeping a warmed up JVM running the Graal compiler around. You can bypass it by adding the |
Thanks for your help !
Have I missed something ? |
Does your reflection config contains |
Yes it's inside it
|
Hi @cstancu , Were you able to dig further on this issue? Thanks for your help, Nicolas |
Hi @nhenneaux I'm currently working on this issue, I'm trying to reproduce it and not seeing the
Did you encounter this error? This is the
|
Hi,
Are you running it using Java 11? It needs an alpn processor which is not
available in Java 8.
Thanks for your support,
Best regards,
Nicolas Henneaux
…On Wed, 18 Mar 2020 23:16 Jose Ramirez, ***@***.***> wrote:
Hi @nhenneaux <https://github.com/nhenneaux> I'm currently working on
this issue, I'm trying to reproduce it and not seeing the no-parameter
constructor message, but I'm getting a different error message, even when
running with java -jar:
2020-03-18 15:55:37.391:INFO::main: Logging initialized @1808ms to org.eclipse.jetty.util.log.StdErrLog
Exception in thread "main" java.lang.IllegalStateException: No Server ALPNProcessors!
at org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>(ALPNServerConnectionFactory.java:52)
at com.github.nhenneaux.jersey.http2.jetty.bundle.JettyServer.getConnectionFactories(JettyServer.java:95)
at com.github.nhenneaux.jersey.http2.jetty.bundle.JettyServer.<init>(JettyServer.java:58)
at com.github.nhenneaux.jersey.http2.jetty.bundle.Bootstrap.main(Bootstrap.java:16)
Suppressed: java.lang.IllegalStateException: org.eclipse.jetty.alpn.ALPN must be on JVM boot classpath
at org.eclipse.jetty.alpn.openjdk8.server.OpenJDK8ServerALPNProcessor.init(OpenJDK8ServerALPNProcessor.java:44)
at org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>(ALPNServerConnectionFactory.java:72)
... 3 more
Did you encounter this error?
This is the native-image command I ran:
native-image -H:ReflectionConfigurationFiles=config-dir/reflect-config.json -H:ResourceConfigurationFiles=config-dir/resource-config.json --enable-all-security-services --allow-incomplete-classpath --report-unsupported-elements-at-runtime --no-fallback -jar target/jersey-http2-jetty-bundle-*-bundle.jar
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2075 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJ2ORUK6R2MAKJU3ZJG4PLRIFB4LANCNFSM4KHU6HFA>
.
|
@nhenneaux Yes, that was it, thank you.
Instead of |
I just tested it now and it works with latest version. Fallback is still needed.
Without fallback, I got the following
@jramirez-isc is there still problem with keystore handling? |
@nhenneaux you still need to use
|
I made some progress but still blocked on the following error.
I used the following parameters to build native image. I added resources bundles that were missing.
I built configuration files using Graal agent.
Full stacktrace
@jramirez-isc any idea how to progress further? |
Issue in log4j2, rest is now ok. LOG4J2-2649, see also #1209 |
I tried to build the bundle jar built in the project jersey-http2-jetty-connector using
mvn clean verify -DskipTests -DskipDepCheck
command.First I tried without any option.
native-image -jar jersey-http2-jetty-connector/jersey-http2-jetty-bundle/target/jersey-http2-jetty-bundle-*-bundle.jar
It failed and I got the following error.
So I tried with
--report-unsupported-elements-at-runtime
I got the following warnings.
Warning: Image 'jersey-http2-jetty-bundle-1.0.0-bundle' is a fallback image that requires a JDK for execution (use --no-fallback to suppress fallback image generation).
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.slf4j.impl.StaticMarkerBinder.getSingleton(). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
Then with
--allow-incomplete-classpath
The build succeed, however when I try to run the native bundle it fails with the following error.
Do you have any idea why I got the error
java.lang.ClassNotFoundException: java.security.KeyStoreSpi
?Thanks for your help
The text was updated successfully, but these errors were encountered: