Weblogic 12C错误java.lang.ClassNotFoundException:weblogic.jms.common.ResourceAllocationException

时间:2019-03-30 18:23:32

标签: classpath weblogic12c

我在WebLogic 12 C上遇到此问题,其中应用程序给出了此错误

java.lang.ClassNotFoundException: weblogic.jms.common.ResourceAllocationException

上述类的jar是wlclient.jar,它不包含在我的应用程序中,我检查了托管服务器的类路径,它也不包含在其中。

有趣的是,如果我尝试将wlclient.jar添加到setDomainEnv.sh中,作为PRE_CLASSPATH希望它会拾取jar,我将收到以下错误消息,并且受管服务器无法启动

<30-Mar-2019, 5:49:50,757 PM GMT> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: A MultiException has 2 exceptions.  They are:
1. java.lang.ExceptionInInitializerError
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.iiop.IIOPClientService

A MultiException has 2 exceptions.  They are:
1. java.lang.ExceptionInInitializerError
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.iiop.IIOPClientService

        at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:391)
        at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
        at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:232)
        at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
        at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2020)
        Truncated. see log file for complete stacktrace
Caused By: java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at weblogic.corba.j2ee.naming.ORBHelper.<clinit>(ORBHelper.java:158)
        at weblogic.iiop.IIOPClientService.initialize(IIOPClientService.java:129)
        at weblogic.iiop.IIOPClientService.start(IIOPClientService.java:195)
        Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalStateException: Cannot change <isServer>
        at weblogic.kernel.KernelStatus.setIsThinIIOPClient(KernelStatus.java:164)
        at weblogic.jndi.WLInitialContextFactory.<clinit>(WLInitialContextFactory.java:26)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at weblogic.corba.j2ee.naming.ORBHelper.<clinit>(ORBHelper.java:158)
        Truncated. see log file for complete stacktrace
>
<30-Mar-2019, 5:49:50,825 PM GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED.>
<30-Mar-2019, 5:49:50,825 PM GMT> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down.>
<30-Mar-2019, 5:49:50,827 PM GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN.>

1 个答案:

答案 0 :(得分:0)

我发现如果我像下面那样完全添加类路径,则受管服务器在启动时给出了错误 ,

PRE_CLASSPATH="${DOMAIN_HOME}/lib/wlclient.jar"
export PRE_CLASSPATH

但是,如果我按如下所示添加类路径,则它可以工作。

PRE_CLASSPATH="${DOMAIN_HOME}/lib/"
export PRE_CLASSPATH