Skip to content
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

GWT 2.11 and Jetty 9.4.54.v20240208 error running in IntelliJ 2024.1 Ultimate #9948

Open
dgeiselmanMOO opened this issue Apr 10, 2024 · 2 comments

Comments

@dgeiselmanMOO
Copy link

dgeiselmanMOO commented Apr 10, 2024

GWT version: 2.11
Browser (with version): Chrome
Operating System: Windows 10


Description

Build runs fine, but when trying to run the GWT Configuration for my project I am getting an error related to Jetty.

Jetty 9.4.54.v20240208 is giving me

Object of class 'com.google.gwt.dev.shell.jetty.JettyLauncher.WebAppContextWithReload' is not of type 'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type Class are from different loaders

jetty-web.xml is

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
 <Set name="maxFormContentSize" type="int">99999999</Set>
 <Get name="securityHandler">
   <Set name="loginService">
     <New class="org.eclipse.jetty.security.HashLoginService">
     	   <Set name="name">mutualofomaha.com</Set>
           <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
     </New>
   </Set>
 </Get>
</Configure>

WebAppContextWithReload is not mentioned anywhere in my project

Jetty 9.3.30.v20211001 is giving me that it requires ASM 7, and I saw in my dependencies I'm running 9+.

Steps to reproduce

Running a GWT application with Jetty and GWT 11 in IntelliJ 2024.1

VM options -Xmx2048m -Xms512m

Known workarounds
Links to further discussions
@dgeiselmanMOO dgeiselmanMOO changed the title GWT 2.11 and Jetty 9.4.54.v20240208 error running in IntelliJ 2021.1 Ultimate GWT 2.11 and Jetty 9.4.54.v20240208 error running in IntelliJ 2024.1 Ultimate Apr 10, 2024
@niloc132
Copy link
Contributor

I believe this is a duplicate of #9809, based on the abbreviated stack trace - can you confirm?

@jnehlmeier
Copy link
Member

GWT 2.11 ships with Jetty 9.4.44.

The error says we have an instance of WebAppContextWithReload, provided by GWT SDK, loaded by classloader A but its superclass WebAppContext, provided by GWT SDK AND your jetty dependency, is loaded by classloader B.

Why do you have Jetty in your dependencies with scope runtime?

If you customize jetty then you likely cannot use the embedded Jetty provided by GWT SDK. Using the embedded Jetty as a full fledged application server that you can customize has been deprecated for exactly that reason. You should launch your own Jetty, deploy your server application to it and use GWT SDK to only launch SuperDevMode to compile the app to JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants