我试图通过将类传递给引导类加载器(使用-Xbootclasspath / p参数),从另一个应用程序(用C ++编写)运行一个简单的JMS Weblogic应用程序。我想知道JMS和Weblogic是否完全可以做到这一点,因为我的其他类型的Java应用程序都可以使用这种方法(Xbootclasspath)很好地工作。
我提供的参数是:
JVM path: C:/Program Files (x86)/Java/jdk1.8.0_131/jre/bin/server/jvm.dll
JVM options:
-Dmdrv.launcher=1
-Xverify:none
-Djava.security.policy=C:/classes/security/recorder.policy
-Xbootclasspath/p:
C:\Users\kadar\Documents\VuGen\Scripts\JavaRecordReplay12\;
C:\Program Files (x86)\classes;
C:\Program Files (x86)\classes/srv;
C:\Program Files (x86)\classes/srv/additional_classes;;
C:\Program Files (x86)\lib/xstream-1.4.10.jar;
C:\Program Files (x86)\lib/xpp3-1.1.4c.jar;
C:\Program Files (x86)\lib/common-java-rr.jar;
C:\Users\kadar\Desktop\Java AUTs\JavaRecordReplay\JMS_Queue_Browse_Receive\QueueBrowse_BuiltWithJDK8_CompatibleWith8_9_10\out\production\QueueBrowse;
C:\Users\kadar\Desktop\Java AUTs\JavaRecordReplay\JMS_Queue_Browse_Receive\QueueBrowse_BuiltWithJDK8_CompatibleWith8_9_10\Lib\wlclient.jar;
C:\Users\kadar\Desktop\Java AUTs\JavaRecordReplay\JMS_Queue_Browse_Receive\QueueBrowse_BuiltWithJDK8_CompatibleWith8_9_10\Lib\wljmsclient.jar;;;;
我得到的错误是:
Actions.java(34): Error: System.err: Dec 03, 2018 4:18:15 PM com.sun.corba.se.impl.util.Utility autoConnect
WARNING: "IOP00511403: (INV_OBJREF) Class weblogic.messaging.dispatcher.DispatcherImpl not exported, or else is actually a JRMP stub"
org.omg.CORBA.INV_OBJREF: vmcid: SUN minor code: 1403 completed: No
at com.sun.corba.se.impl.logging.UtilSystemException.objectNotExported(UtilSystemException.java:507)
at com.sun.corba.se.impl.logging.UtilSystemException.objectNotExported(UtilSystemException.java:530)
at com.sun.corba.se.impl.util.Utility.autoConnect(Utility.java:158)
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:470)
at javax.rmi.CORBA.Util.writeAbstractObject(Util.java:165)
at com.sun.corba.se.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:153)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
at weblogic.messaging.dispatcher.DispatcherWrapper.writeExternal(DispatcherWrapper.java:194)
at weblogic.jms.frontend.FEConnectionCreateRequest.writeExternal(FEConnectionCreateRequest.java:121)
at com.sun.corba.se.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:554)
at com.sun.corba.se.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:174)
at com.sun.corba.se.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:236)
at com.sun.corba.se.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:218)
at com.sun.corba.se.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:150)
at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:807)
at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:856)
at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:870)
at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:665)
at com.sun.corba.se.impl.encoding.CDROutputStream.write_value(CDROutputStream.java:250)
at weblogic.jms.frontend._FEConnectionFactoryRemote_Stub.connectionCreateRequest(_FEConnectionFactoryRemote_Stub.java:90)
at weblogic.jms.client.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:399)
at weblogic.jms.client.JMSConnectionFactory.setupJMSConnection(JMSConnectionFactory.java:285)
at weblogic.jms.client.JMSConnectionFactory.createConnectionInternal(JMSConnectionFactory.java:574)
at weblogic.jms.client.JMSConnectionFactory.createQueueConnection(JMSConnectionFactory.java:212)
at Actions.action(Actions.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.hpe.lr.java.replay.ScriptContainer.invoke(ScriptContainer.java:68)
at com.hpe.lr.java.replay.ScriptContainer.action(ScriptContainer.java:59)
Error
Actions.java(34): Error: java.lang.ExceptionInInitializerError
weblogic.jms.JMSClientExceptionLogger.logErrorCreatingConnectionLoggable(JMSClientExceptionLogger.java:1717)
weblogic.jms.client.JMSConnectionFactory.setupJMSConnection(JMSConnectionFactory.java:321)
weblogic.jms.client.JMSConnectionFactory.createConnectionInternal(JMSConnectionFactory.java:574)
weblogic.jms.client.JMSConnectionFactory.createQueueConnection(JMSConnectionFactory.java:212)
Actions.action(Actions.java:34)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.hpe.lr.java.replay.ScriptContainer.invoke(ScriptContainer.java:68)
com.hpe.lr.java.replay.ScriptContainer.action(ScriptContainer.java:59)
如果我将类加载到常规的类加载器(-Djava.class.path)中,则应用程序可以正常运行。