"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 AUGUST 02, 2017

Applies to:

Oracle API Gateway - Version 11.1.2 and later
Information in this document applies to any platform.

Symptoms

 A cluster system on windows 7 running OAG 11.1.2.4.0. On this system trying to create a policy to send soap messages to a weblogic JMS Queue but getting error while reading initial context factory and unable to deploy the policy to the server.

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: weblogic
Password: weblogicpassword

Then ran java -jar wljarbuilder.jar to get wlfullclient.jar from weblogic server and copied the jar to $Install_Dir/ext/lib as well as $Install_Dir/ext/win32/lib and $Install_Dir/ext/win32/java.

Then created a policy to send message to queue and gave there the JNDI Name of the weblogic queue. After that tried to deploy which resulted in below error:-

ERROR 2016/04/20 16:20:31.739 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

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms