Announcement

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

    Error in org/eclipse/jetty

    Hi Team,

    I'm getting the below error after launching the application in GWT development mode ("Run as" > " gwt:debug") which runs on internal jetty server. SmartGWT- 13.0, Spring- 6.0.0, Java - 17.0.9, Eclipse Jetty - 12.0.5 , Apache maven - 3.8.2, GWT- 2.10.1 and gwt-maven-plugin - 2.10.0 are the Versions which we are currently using.

    [INFO] --- gwt-maven-plugin:2.10.0:debug (default-cli) @ abc ---
    [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
    [ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/webapp/WebAppContext
    [ERROR] at java.base/java.lang.Class.forName0(Native Method)
    [ERROR] at java.base/java.lang.Class.forName(Class.java:467)
    [ERROR] at com.google.gwt.dev.DevMode$ArgHandlerServer.setString(DevMode.java:182)
    [ERROR] at com.google.gwt.util.tools.ArgHandlerString.handle(ArgHandlerString.java:26)
    [ERROR] at com.google.gwt.util.tools.ToolBase.processArgs(ToolBase.java:291)
    [ERROR] at com.google.gwt.dev.ArgProcessorBase.processArgs(ArgProcessorBase.java:30)
    [ERROR] at com.google.gwt.dev.DevMode.main(DevMode.java:431)
    [ERROR] Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.webapp.WebAppContext
    [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] ... 7 more

    And we are getting the below error while downloading the gwt-maven-plugin for version above 2.10.0 from Maven central repository
    [ERROR] Plugin org.codehaus.mojo:gwt-maven-plugin:2.10.1 or one of its dependencies could not be resolved: org.codehaus.mojo:gwt-maven-plugin:jar:2.10.1 was not found.

    [ERROR] Plugin org.codehaus.mojo:gwt-maven-plugin:2.11.0 or one of its dependencies could not be resolved: org.codehaus.mojo:gwt-maven-plugin:jar:2.11.0 was not found.

    Could you please help me to solve these errors?


    Thanks in advance

    #2
    What version of the GWT Plugin do you have installed in Eclipse?

    The GWT Plugin will normally install both a "GWT Development Mode (CodeServer)" and "GWT Development Mode (DevMode)" run modes, where with the latter you're using a Jetty server built into GWT, which has some limitations. If you want to use your own Jetty server, or one provided by Eclipse, you should use the CodeServer run option.

    Instead of the "run as" flyout menu, can you open the "run configurations" dialog, manually select either CodeServer or DevMode, as appropriate, and let us know what settings you've applied? As mentioned, if you're using DevMode, GWT shouldn't attempt to load an external Jetty class.

    Comment


      #3
      Below are the GWT versions which we are using in our project
      gwt-maven-plugin - 2.10.0
      gwt-dev-2.10.1
      gwt-user-2.10.1
      gwt-servlet-2.10.1
      gwt-codeserver-2.10.1
      gwt-sl-1.3-RC1

      I'm unable to get the version of the GWT Plugin installed in Eclipse. Attached the error image for your reference.
      Unable to manually select 'CodeServer' or 'DevMode' option in the "run configurations" dialog.
      Attached Files
      Last edited by Kalaibharathi; 18 Jan 2024, 22:26.

      Comment


        #4
        Can you install the GWT Plugin using these instructions?

        Comment


          #5
          https://github.com is blocked by our organization proxy. And I'm getting the below error while using drag and drop method.
          Also Unable to install via 'Install New Software' option. Is there any other way to resolve this?
          Attached Files
          Last edited by Kalaibharathi; 19 Jan 2024, 06:03.

          Comment


            #6
            Both URLs you show in your screenshots work fine for us, so clearly your organization is blocking all the normal means of installing the plugin. You may want to check on whether your organization prohibits Eclipse plugins. If not perhaps you can download the Github zip on your phone and then transfer it to your desktop, or use TOR or a VPN to download it, unless those are blocked as well.

            Alternatively, you can build, run, and debug GWT with Apache Ant instead of Eclipse, if that's easier. Check out our SmartGWT debugging overview and the help topic on Maven support.

            Comment


              #7
              Since GWT Eclipse plugins is a third party software and our organization restricts the installation of any eclipse plugins. Is there any other option to resolve the above error "Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/util/log/Logger"

              Comment


                #8
                See previous response: if you are entirely blocked from using Eclipse plugins (which is ridiculous, we have to say), then you can use Ant, as described above.

                Comment


                  #9
                  Is there any other solution than switching the IDE from eclipse to Ant?

                  For this "[ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/util/log/Logger", we could able to find that Logger.class in jetty-util-11.019.jar

                  So we tried using that JAR to resolve that error but after that we are getting another error like "[ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/security/ConstraintSecurityHandler" and able to find that ConstraintSecurityHandler.class in jetty-security-8.1.2.v20120308.jar

                  Tried to implement that and again we are getting "[ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/handler/HandlerWrapper"

                  Please provide us with the details of which version of JARs need to be used to resolve these errors?

                  Comment


                    #10
                    So to be clear, you are not having a problem with our product, but with getting a normal Jetty and GWT install. You have not hit a point yet where our software is even involved. So you might seek help on other forums.

                    From a quick take though, you seem to be having classpath problems: you might have installed two (or more) mutually incompatible versions of Jetty, or you not have placed all the Jetty jars on your classpath.

                    We would recommend feeding your errors to ChatGPT, or again seeking help on other forums. We would be happy to help further when your problems involved our software.

                    Comment

                    Working...
                    X