-
Notifications
You must be signed in to change notification settings - Fork 383
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
Error running java 17+ byte code in devmode server #9896
Comments
I faced similar issue recently. Compile your code using Java target level compatible with the target environment. I don't think any other approach is going to work. I hope this helps you. |
Jetty 9.4.44 uses ASM 9.2 and thus supports scanning class files up to Java 18. Disabling annotation processing is not a great option as it forces some to change their project. I think it is better to just document the fact that only Java 18 class files are supported and if someone wants to use newer Java versions they either could try to disable annotation processing for that project or bring their own server. Given that java releases are relatively fast now, this will continue to happen in the future unless we update Jetty regularly. |
Among other reasons, this is why we're deprecating the use of the built-in app server, and encouraging external server implementations (to be passed via |
Should we close this issue or do we want to update Jetty again? Currently it is expected behavior and the built-in app server has been deprecated. So I tend to leave it as is and close the issue. |
Yep, we filed it to make sure to have an issue that shows the error, and outlines specific workarounds that are available. Updating Jetty while still supporting it in this way is technically an option, but is probably going to introduce more headache with all the various ways that downstream projects might want to use it - I'd lean towards removing the JettyLauncher first, then limit what parts of Jetty we use while updating to the latest build we can support (need to keep htmlunit in mind too, see HtmlUnit/htmlunit#704). |
GWT version: 2.11
Browser (with version):Any
Operating System: ubuntu
Running dev mode using the built in server with classes compiled with bytecode java 17+ will produce an error
As the tail end of the error shows, this is a problem specifically with asm, or with how Jetty is using asm.
Workarounds:
-noserver
and running your own server (to correctly mirror how the application will run in production), or by serving only static resources by passing-server com.google.gwt.dev.shell.StaticResourceServer
, disabling dev mode from running server-side code, but still allowing it to host static resources in the war directory.The text was updated successfully, but these errors were encountered: