When trying to run my project as a WebApplication from Eclipse, I have the following error:
[WARN] failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@4b903fd{/,D:\Dev\Projects\The Five Orbs\trunk\target\fiveorbs-0.1}: java.lang.NoClassDefFoundError: com/google/inject/servlet/GuiceServletContextListener
[WARN] failed JettyContainerService$ApiProxyHandler@eb4d977: java.lang.NoClassDefFoundError: com/google/inject/servlet/GuiceServletContextListener
[WARN] Error starting handlers
java.lang.NoClassDefFoundError: com/google/inject/servlet/GuiceServletContextListener
The class can be found at compile time though (my custom GuiceServletConfig extends GuiceServletContextListener and compiles properly).
The guice-servlet-3.0.jar
library appears both in the project build path and in the classpath of my Web Application Run Configuration in Eclipse.
The Arguments panel of my Run Configuration has the following config: in Program arguments:
-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl TheFiveOrbs.jsp -logLevel INFO -server com.google.appengine.tools.development.gwt.AppEngineLauncher -port 8888 -codeServerPort 9997 -war "D:\Dev\Projects\The Five Orbs\trunk\target\fiveorbs-0.1" com.fiveorbs.TheFiveOrbs
in VM arguments:
-javaagent:D:\Dev\Programs\appengine-java-sdk\lib\agent\appengine-agent.jar -Xmx512m -Dappengine.sdk.root=D:\Dev\Programs\appengine-java-sdk
When I run mvn gae:run from the command prompt with Maven, everything is fine though - the server starts properly and no exception is shown.
I have been struggling with this issue for a couple of hours, and really cannot fathom why it occurs.
Thanks in advance for any hint you might be able to offer.
Sébastien
guice-servlet-3.0.jar
should not be in you launch configuration classpath, it should live in your D:\Dev\Projects\The Five Orbs\trunk\target\fiveorbs-0.1\WEB-INF\lib
folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With