"javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory" Error Reporte When Creating JMS Services In OAG-11.1.2.4.0
(Doc ID 2130897.1)
Last updated on MARCH 11, 2022
Applies to:
Oracle API Gateway - Version 11.1.2.3.0 and laterInformation in this document applies to any platform.
Symptoms
A clusteedr system of OAG 11.1.2.4.0 instances exist. On this system,when trying to create a policy to send soap messages to a Weblogic JMS Queue, an error occurs while reading the initial context factory and it is not possible to deploy the policy to the Gateway.
An example:-
Created JMS Service with below details:
Name: Oracle WebLogic
Service Type= Standard JMS
Provider URL: t3://localhost:7001
Initial Context Factory: weblogic.jndi.WLInitialContextFactory
Connection Factory: weblogic.jms.ConnectionFactory
Username: <USERNAME>
Password: <PASSWORD>
Run java -jar wljarbuilder.jar to get wlfullclient.jar from Weblogic server and copied the jar to $OAG_HOME/apigateway/ext/lib as well as $OAG_HOME/apigateway/ext/win32/lib and $OAG_HOME/apigateway/ext/win32/java.
Create a policy to send a message to a queue and provide the JNDI Name of the Weblogic queue. After that, deploy. The following error occurs:-
ERROR <TIMESTAMP> [<THREAD ID>] Error executing reconnect to JMS Service Oracle Weblogic:
javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
at javax.naming.InitialContext.init(InitialContext.java:242)
at javax.naming.InitialContext.<init>(InitialContext.java:216)
at com.vordel.dwe.jms.JMSService.connect(JMSService.java:482)
at com.vordel.dwe.jms.JMSService.access$900(JMSService.java:70)
at com.vordel.dwe.jms.JMSService$1.call(JMSService.java:452)
at com.vordel.dwe.jms.JMSService$1.call(JMSService.java:448)
at com.vordel.common.concurrent.SelfRetriableTask.call(RetriableCommand.java:117)
at com.vordel.common.concurrent.SelfRetriableTask.call(RetriableCommand.java:105)
at com.vordel.common.concurrent.RetriableCommand.execute(RetriableCommand.java:50)
at com.vordel.dwe.jms.JMSService.startConnectJob(JMSService.java:471)
at com.vordel.dwe.jms.JMSService.configure(JMSService.java:439)
at com.vordel.dwe.jms.JMSServiceGroup.configure(JMSServiceGroup.java:36)
at com.vordel.precipitate.SolutionPack.loadModules(SolutionPack.java:398)
at com.vordel.dwe.Service.refresh(Service.java:449)
at com.vordel.api.configuration.ConfigurationService.updateConfiguration(ConfigurationService.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
Caused by: java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |