gpt4 book ai didi

java - Google 应用程序引擎 - NoClassDefFoundError : Could not initialize class org. jboss.errai.jaxrs.ErraiProvider

转载 作者:行者123 更新时间:2023-12-01 12:49:44 25 4
gpt4 key购买 nike

当我从 Google Console 检查我的 GAE 日志时,我可以看到以下错误。然而,我的应用程序可以在 GWT 开发模式下工作,并且在本地主机中部署时也可以工作,所以我很好奇导致此问题的问题是什么:

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>

最佳答案

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

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

关于java - Google 应用程序引擎 - NoClassDefFoundError : Could not initialize class org. jboss.errai.jaxrs.ErraiProvider,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24321175/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com