Google App Engine - NoClassDefFoundError:无法初始化类org.jboss.errai.jaxrs.ErraiProvider

时间:2014-06-20 06:25:31

标签: java google-app-engine maven gwt errai

当我从Google控制台检查我的GAE日志时,我可以看到下面的错误。然而,我的应用程序可以找到GWT开发模式,也可以在localhost中部署,所以我很好奇导致这个问题是什么:

Uncaught exception from servlet java.lang.NoClassDefFoundError: Could not initialize class org.jboss.errai.jaxrs.ErraiProvider 
        at com.google.appengine.runtime.Request.process-0c118cfa1dca4123(Request.java) 
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)      
        at java.lang.reflect.Constructor.newInstance(Constructor.java:33) at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:132) 
        at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:1801) 
        at org.jboss.resteasy.spi.ResteasyProviderFactory.addMessageBodyReader(ResteasyProviderFactory.java:681) 
        at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1128) 
        at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1085) 
        at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1029) 
        at org.jboss.resteasy.spi.ResteasyDeployment.registerProvider(ResteasyDeployment.java:508) 
        at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:316) 
        at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:226)            
        at org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:28) at 

我的配置在这里:https://community.jboss.org/thread/232585

pom.xml 有这个:

<dependency>
  <groupId>org.jboss.errai</groupId>
  <artifactId>errai-jaxrs-provider</artifactId>
  <version>${version.errai}</version>
</dependency>

1 个答案:

答案 0 :(得分:1)

您收到此错误是因为您未在/war/WEB-INF/lib/文件夹中包含必需的jar。将它添加到类路径中是不够的。

如果您使用Eclipse,则应在“问题”选项卡中看到有关服务器上不可用的资源的警告。