Closed Lighter100 closed 3 years ago
Issue reported: Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory]
Make sure dependent wlthint3client.jar and webloic.jar libraries are in classpath for JMeter.
Related lib was put in the JMeter lib folder.
Hello @Lighter100 ,
With the help of Reza, we finally resolved the Jmeter T3 connection issue.
Root cause is that the older weblogic client library uses iiop
to connect the server.
We should use the latest weblogic client lib (you can get it from weblogic 14c installation directory $ORACLE_HOME/wlserver/server/lib/wlthint3client.jar
).
Please follow the steps to fix the error.
1. Enable T3 access to managed server
Currently, the WebLogic cluster that deployed from Azure Oracle WebLogic Server Cluster application does not allow remote T3 access to managed server, see issue #314 Workaround to enable T3 access to managed servers:
msp1
mspVM1
from Listen Address, keep it emptymsp1
:msp1
-> Shutdownmsp1
-> Start2. Create JMS server and JMS modules
2.1. Create JMS server, specifying the following properties.
Target: msp1
2.2. Create JMS module
Name: MyJMSModule
Scope: Global
Target: msp1
Would you like to add resources to this JMS system module? Yes.
2.3. Create resources for MyJMSModule
Connection Factory
Name: MyConnectionFactory
JNDI Name: weblogic.examples.jms.QueueConnectionFactory
Distributed Queue
Name: MyDistination
JNDI Name: weblogic.examples.jms.exampleQueue
3. Use latest wlthint3client.jar
Close Jmeter.
Clean all weblogic lib that you have added to the Jmeter lib folder. If you do not remember which jar to remove, please install a clean Jmeter.
Download and unzip wlthint3client.zip, put wlthint3client.jar
to Jmeter lib folder, for example: C:\temp\apache-jmeter-5.4.1\lib
4 Start Jmeter
5. Create JMS Publisher
Initial Context Factory: weblogic.jndi.WLInitialContextFactory
Provider URL: <your-t3-string-t3://13.92.229.223:8001>
Use Authenrization: Yes, input User/Password
Connection Factory: weblogic.examples.jms.QueueConnectionFactory
Destination: weblogic.examples.jms.exampleQueue
6. Create JMS Subscriber
Initial Context Factory: weblogic.jndi.WLInitialContextFactory
Provider URL: <your-t3-string-t3://13.92.229.223:8001>
Use Authenrization: Yes, input User/Password
Connection Factory: weblogic.examples.jms.QueueConnectionFactory
Destination: weblogic.examples.jms.exampleQueue
7. Run test
You should find successful log like:
8. More
You can also test the JMS server with Jmeter JMS Point to Point Sampler, set value as following:
Initial Context Factory: weblogic.jndi.WLInitialContextFactory
Provider URL: <your-t3-string-t3://13.92.229.223:8001>
QueueConnectionFactory: weblogic.examples.jms.QueueConnectionFactory
JNDI name Request queue: weblogic.examples.jms.exampleQueue
JNDI name Revive queue: weblogic.examples.jms.exampleQueue
Thanks a lot , it works~
How can I test JMS with volume request in Azure WebLogic Cluster environment? The result should be visible in Azure WebLogic report console with request count and time sequence. for example : https://medium.com/wlsdmforweblogic/oracle-weblogic-jms-overview-and-monitoring-jms-servers-messages-queues-by-using-wlsdm-ec02b3158159