Weblogic“ java.lang.IllegalArgumentException:未知的bean状态0”异常

时间:2019-04-01 12:14:50

标签: java weblogic illegalargumentexception

我正在调查为什么在我们的weblogic服务器中引发相同类型的异常。我们不断得到

java.lang.IllegalArgumentException:未知的bean状态0

例外。通常在高峰时间,但它也发生在茫茫荒野中。我在Google上对此进行了研究,但无法获得“ Unknown bean state 0”部分的任何答案。我几乎可以确定线程没有卡住,因为在异常中没有任何[STUCK]标签。

以下是异常日志:

####<2019-mar-28 kl 12:51 CET> <Error> <com.project-name.log.LoggerInterceptorWrapper> <abcdef.test.project-name.com> <ServerName> <[ACTIVE] ExecuteThread: '38' for queue: 'weblogic.kernel.Default (self-tuning)'> <Username123test> <BEA1-4577D692FF125C4F476F> <afc37f9d-a9b3-451a-a0e2-82f719563297-000626b1> <1553773880079> <BEA-000000> <Exception in intercept 
java.lang.IllegalArgumentException: Unknown bean state 0
    at weblogic.ejb.container.internal.WLEnterpriseBeanUtils.getEJBStateAsString(WLEnterpriseBeanUtils.java:47)
    at weblogic.ejb.container.internal.BaseEJBContext.checkAllowedMethod(BaseEJBContext.java:78)
    at weblogic.ejb.container.internal.BaseEJBContext.getCallerPrincipal(BaseEJBContext.java:109)
    at com.project-name.log.LoggerInterceptorWrapper.intercept(LoggerInterceptorWrapper.java:37)
    at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:109)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(Unknown Source)
    at com.sun.proxy.$Proxy237.getCustomersInfo(Unknown Source)
    at com.project-name.service.ejb.internal-service.EJBinternal-serviceCustomerBean_EJBinternal-serviceCustomerRemoteImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:34)
    at com.project-name.service.ejb.internal-service.EJBinternal-serviceCustomerBean_EJBinternal-serviceCustomerRemoteImpl.getCustomersInfo(Unknown Source)
    at com.project-name.service.ejb.internal-service.EJBinternal-serviceCustomerBean_EJBinternal-serviceCustomerRemoteImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:701)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:231)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:527)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:523)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
> 

####<2019-mar-28 kl 12:51 CET> <Info> <com.project-name.log.LoggerInterceptorWrapper> <abcdef.test.project-name.com> <ServerName> <[ACTIVE] ExecuteThread: '31' for queue: 'weblogic.kernel.Default (self-tuning)'> <Username123test> <BEA1-446ED692FF125C4F476F> <f4df277f-9a33-478d-a0c1-bd9f87f26e86-0005e623> <1553773879478> <BEA-000000> <class java.lang.IllegalArgumentException Could not add request context to trans log, message Unknown bean state 0> 

在高峰时间,对于不同的客户和不同的服务bean,我不断收到数千个此类异常。

我正在使用 Weblogic 12.1.3

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

当使用@Resource注入到另一个bean实例时,我注意到了此异常。例如,当@Resource存储在某个静态变量中并在以后由Bean使用时。这与观察到异常在高峰时间发生的观察结果相符,因为WebLogic此时会创建其他bean实例(每个都有自己的@Resource对象)。