我有一个包含EJB项目(MyEJB)的Java EE项目(MyProject)我创建了一个会话bean(无状态),它也是我的Web服务类(ServiceAddTEST)。容器是weblogic 12.2.1。 一切顺利,但当我在weblogic的控制台中调用web服务时,显示以下消息:
<Mar 6, 2016 6:30:35 PM IRST> <Error> <Kernel> <BEA-000802> <ExecuteRequest failed
java.lang.IllegalStateException: Context pushed was [(pId = 0, pName = DOMAIN, appId = MyProject, appName = MyProject, appVersion = null, mId = /ServiceAddTEST, compName = /ServiceAddTEST)], but context being popped is [(pId = 0, pName = DOMAIN, appId = MyProject, appName = MyProject, appVersion = null, mId = MyEJB, compName = ServiceAddTEST)].
java.lang.IllegalStateException: Context pushed was [(pId = 0, pName = DOMAIN, appId = MyProject, appName = MyProject, appVersion = null, mId = /ServiceAddTEST, compName = /ServiceAddTEST)], but context being popped is [(pId = 0, pName = DOMAIN, appId = MyProject, appName = MyProject, appVersion = null, mId = MyEJB, compName = ServiceAddTEST)]
at weblogic.application.ComponentInvocationContextManagerImpl$4.validate(ComponentInvocationContextManagerImpl.java:256)
at weblogic.application.ComponentInvocationContextManagerImpl$4.close(ComponentInvocationContextManagerImpl.java:231)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
Truncated. see log file for complete stacktrace
>
但是,Web服务运行正常。我想解决问题摆脱这个日志,我认为它可能会导致一些问题。 此外,日志文件中没有任何额外信息。以下是该类的代码:
@Stateless
@WebService
public class ServiceAddTEST {
@WebMethod
public int getCount(){
return 20;
}
关于环境:
答案 0 :(得分:2)
答案 1 :(得分:0)
我经常搜索这个问题,最后我发现它可能是weblogic12cR2的一个错误,因为这个场景非常简单。见link。 我决定降级weblogic,现在我正在使用Weblogic 12.1.2,它运行正常。