gpt4 book ai didi

java - Websphere 8.5 上的异常启动应用程序

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:13:40 24 4
gpt4 key购买 nike

我在 WebSphere 8.5 上启动 Web 应用程序时遇到此错误。应用程序通过 DB2 上的 MyBatis 存储过程调用。用户使用 REST WS 触发调用,使用 Jersey 框架实现。 Spring 将所有东西粘合在一起。相同的应用程序在 Tomcat 7 上工作正常。有人看到这个错误吗?任何帮助将不胜感激)。似乎无法为应用程序初始化上下文和依赖注入(inject)容器。

堆栈跟踪:

[26.11.13 10:20:36:339 MSK] 000000a3 BeansDeployer E BeansDeployer deploy 
java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException
at org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedType(AnnotatedElementFactory.java:150)
at org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:484)
at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:171)
at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:124)
at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:78)
at com.ibm.ws.webbeans.common.CommonLifeCycle.startApplication(CommonLifeCycle.java:106)
at com.ibm.ws.webbeans.services.JCDIServletContainerInitializer.onStartup(JCDIServletContainerInitializer.java:85)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:613)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)

skip ...

at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at org.apache.webbeans.portable.AbstractAnnotatedCallable.setAnnotatedParameters(AbstractAnnotatedCallable.java:66)
at org.apache.webbeans.portable.AnnotatedConstructorImpl.<init>(AnnotatedConstructorImpl.java:56)
at org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedType(AnnotatedElementFactory.java:117)
... 108 more

最佳答案

在 Websphere 8 上有同样的问题。这个答案是基于 user3040441 的评论。为了避免其他人进行额外的研究来解决这个问题。

https://code.google.com/p/guava-libraries/wiki/Release15#A_note_on_JEE6_/_CDI_1.0

A note on JEE6 / CDI 1.0

A workaround added in Guava 15.0 to make it compatible with CDI 1.1 (used in JEE7 containers) caused problems for Guava with CDI 1.0 (used in JEE6 containers).

If you're using Guava in a CDI 1.0 environment, you should use guava-15.0-cdi1.0.jar instead of the normal Guava jar. In Maven, the dependency can be specified as:

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>15.0</version>
<classifier>cdi1.0</classifier>
</dependency>

https://code.google.com/p/guava-libraries/issues/detail?id=1527#c20

JSR-330 annotations have been removed for Guava 16.0, so hopefully there will be no further issues with CDI. Now we'll just have issues when code that was taking advantage of the annotations stops working.

关于java - Websphere 8.5 上的异常启动应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20235435/

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