Question

I am getting this error when running my app after deployment:

Could not instantiate listener com.utilitiessavings.usavappv7.server.guice.GuiceServletConfig
java.lang.ClassNotFoundException: com.utilitiessavings.usavappv7.server.guice.GuiceServletConfig
    at com.google.appengine.runtime.Request.process-8209d48b595b1c2d(Request.java)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:360)
    at org.mortbay.jetty.handler.ContextHandler.loadClass(ContextHandler.java:1101)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:630)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1247)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:435)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:442)
    at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:186)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:306)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:298)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:439)
    at java.lang.Thread.run(Thread.java:724)

It is followed by a couple of other errors, but it seems my GuiceServlet (defined in my web.xml) cannot be instantiated for some reason. The next error is the same, but for my uploadServlet, then there are a couple of errors that are caused by the servlets not being available.

My app runs fine in development mode, using GWT 2.5.1, GAE 1.8.5, and GWTP 1.0.1.

This is my first maven version of this project, and I'm not quite sure if I'm deploying it correctly. I am simply using the regular deployment method, from the Google Eclipse Plugin.

Any pointers appreciated.

Was it helpful?

Solution

Found out what I was doing wrong. I needed to use the maven-gae-plugin to deploy it (as was setup in my pom.xml, must have missed that somehow)

Running a maven build with goal gae:deploy did the trick.

Details of how to setup the plugin for anyone who needs it:

<pluginRepositories>
   <pluginRepository>
       <id>sonatype.snapshots</id>
       <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
   </pluginRepository>
</pluginRepositories>



<properties>
   <gae.version>1.7.7</gae.version>
   <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
   <gae.home>
       ${settings.localRepository}/com/google/appengine/appengine-java-sdk/${gae.version}/appengine-java-sdk-${gae.version}
   </gae.home>
<propertiess>

<plugin>
  <groupId>net.kindleit</groupId>
  <artifactId>maven-gae-plugin</artifactId>
  <version>0.9.5</version>
  <configuration>
      <sdkDir>${gae.home}</sdkDir>
          <!-- Add credentials to ~/.m2/settings.xml <id>appengine-credentials</id> -->
          <serverId>appengine-credentials</serverId>
          <splitJars>true</splitJars>
      </configuration>
      <executions>
          <execution>
              <id>unpack</id>
              <phase>validate</phase>
              <goals>
                  <goal>unpack</goal>
              </goals>
          </execution>
          <execution>
              <id>deploy</id>
              <goals>
                  <goal>deploy</goal>
              </goals>
          </execution>
      </executions>
  </plugin>

See: https://github.com/maven-gae-plugin/maven-gae-plugin

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top