Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Error with org/eclipse/jetty/util/Trie and org.eclipse.jetty.server.ServerConnector.setSoLingerTime(int)'

    Hi Team,


    Compiling GWT application built with SmartGWT- 13.0, Spring- 6.0.0, Java - 17.0.5, Eclipse Jetty 11.0.15- , Apache maven - 3.8.3 and getting 2 different below errors after jetty server launch.

    [INFO] starting debugger on port 8000 in suspend mode
    [INFO] create exploded Jetty webapp in C:\Projects\abc\target\abc-1.3
    [INFO] Listening for transport dt_socket at address: 8000
    [INFO] Super Dev Mode starting up
    [INFO] workDir: C:\Users\XXX\AppData\Local\Temp\1\gwt-codeserver-9553029338496159967.tmp
    [INFO] Loading Java files in com.xyz.xproducts.abc.ABC.
    [INFO] Ignored 80 units with compilation errors in first pass.
    [INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
    [INFO] Module setup completed in 68072 ms
    [ERROR] java.lang.NoSuchMethodError: 'void org.eclipse.jetty.server.ServerConnector.setSoLingerTime(int)'
    [ERROR] at com.google.gwt.dev.codeserver.WebServer.start(WebServer.java:126)
    [ERROR] at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:162)
    [ERROR] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:104)
    [ERROR] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:55)
    [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    [ERROR] at com.google.gwt.dev.shell.SuperDevListener.runCodeServer(SuperDevListener.java:112)
    [ERROR] at com.google.gwt.dev.shell.SuperDevListener.start(SuperDevListener.java:91)
    [ERROR] at com.google.gwt.dev.DevMode.ensureCodeServerListener(DevMode.java:666)
    [ERROR] at com.google.gwt.dev.DevModeBase.doStartup(DevModeBase.java:810)
    [ERROR] at com.google.gwt.dev.DevMode.doStartup(DevMode.java:551)
    [ERROR] at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:913)
    [ERROR] at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:706)
    [ERROR] at com.google.gwt.dev.DevMode.main(DevMode.java:432)

    [INFO] starting debugger on port 8000 in suspend mode
    [INFO] create exploded Jetty webapp in C:\Projects\abc\target\abc
    [INFO] Listening for transport dt_socket at address: 8000
    [INFO] Super Dev Mode starting up
    [INFO] workDir: C:\Users\XXX\AppData\Local\Temp\1\gwt-codeserver-13704717497391782153.tmp
    [ERROR] java.lang.NoClassDefFoundError: org/eclipse/jetty/util/Trie
    [ERROR] at com.google.gwt.dev.codeserver.WebServer.<clinit>(WebServer.java:90)
    [ERROR] at com.google.gwt.dev.codeserver.SourceHandler.<clinit>(SourceHandler.java:63)
    [ERROR] at com.google.gwt.dev.codeserver.Recompiler.loadModule(Recompiler.java:500)
    [ERROR] at com.google.gwt.dev.codeserver.Recompiler.initWithoutPrecompile(Recompiler.java:204)
    [ERROR] at com.google.gwt.dev.codeserver.Outbox.maybePrecompile(Outbox.java:89)
    [ERROR] at com.google.gwt.dev.codeserver.Outbox.<init>(Outbox.java:61)
    [ERROR] at com.google.gwt.dev.codeserver.CodeServer.makeOutboxTable(CodeServer.java:192)
    [ERROR] at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:151)
    [ERROR] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:104)
    [ERROR] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:55)
    [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    [ERROR] at com.google.gwt.dev.shell.SuperDevListener.runCodeServer(SuperDevListener.java:112)
    [ERROR] at com.google.gwt.dev.shell.SuperDevListener.start(SuperDevListener.java:91)
    [ERROR] at com.google.gwt.dev.DevMode.ensureCodeServerListener(DevMode.java:666)
    [ERROR] at com.google.gwt.dev.DevModeBase.doStartup(DevModeBase.java:810)
    [ERROR] at com.google.gwt.dev.DevMode.doStartup(DevMode.java:551)
    [ERROR] at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:913)
    [ERROR] at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:706)
    [ERROR] at com.google.gwt.dev.DevMode.main(DevMode.java:432)
    [ERROR] Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.util.Trie
    [ERROR] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    [ERROR] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    [ERROR] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    [ERROR] ... 22 more


    Could you please help me to solve these errors?


    Thanks in advance
    Attached Files
    Last edited by Kalaibharathi; 24 Jul 2023, 19:59.

    #2
    Hi there,

    This isn't to do with our technology, rather it's some kind of Eclipse setup problem (notice how nothing from our technology is in the stack and our classes haven't even been loaded yet).

    Our guess would be that you have multiple versions of Jetty sitting in your classpath, or you have an older version of Jetty but Eclipse is expecting a new one.

    We also tried copying & pasting your question into ChatGPT-4. Here was the response:


    == response from ChatGPT:

    The errors you're facing indicate issues with methods or classes that the Google Web Toolkit (GWT) can't find in your current version of Jetty. The issues can be due to a mismatch in the versions of the libraries and tools you're using. Here are some suggestions to resolve the issues:

    Issue 1: java.lang.NoSuchMethodError: 'void org.eclipse.jetty.server.ServerConnector.setSoLingerTime(int)'

    This indicates that the setSoLingerTime(int) method is not available in the version of Jetty that you're using. This method could be deprecated or removed in the current version. You can try the following solutions:
    1. Check the version of Jetty that you're using and ensure it's compatible with the GWT version. If not, downgrade or upgrade to a version of Jetty that is compatible with your GWT version.
    2. If you have control over the source code, you can replace the method with a newer one if it has been deprecated and replaced.

    Issue 2: java.lang.NoClassDefFoundError: org/eclipse/jetty/util/Trie & java.lang.ClassNotFoundException: org.eclipse.jetty.util.Trie

    This error indicates that the org.eclipse.jetty.util.Trie class can't be found. This could be because:
    1. The version of Jetty you're using doesn't have the Trie class.
    2. The class is in a module or jar file that's not in the classpath.

    Possible solutions:
    1. Similar to the previous error, ensure that the Jetty version you're using is compatible with your GWT version. You might need to downgrade or upgrade your Jetty version.
    2. Ensure that all the necessary dependencies for your project are correctly included in your project's classpath.

    After making these changes, try recompiling your GWT application.

    It's also worth mentioning that your project's dependencies should be managed in a way that prevents conflicting versions. Tools like Apache Maven, which you're already using, should help with this. If the problem persists, please provide more information about your project setup and configuration so I can assist you further.

    Comment

    Working...
    X