javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interf
aces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: o
rg.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at Client_TestPortal.main(Client_TestPortal.java:54)
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFac
tory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
... 5 more
That exception says that initializing of the InitialContext
has failed for your Client_TestPortal
application. The resaon is that it has been unable to load the class org.jnp.interfaces.NamingContextFactory
which (I presume) the default Java Naming provider for your platform.
It appears that your apps classpath is missing a required JAR file. According to this findjar query it could be one of the following:
[LOCAL] jbossall-client.jar
[LOCAL] jbossjmx-ant.jar
[MAVEN2] jnpserver-3.2.3.jar
[MAVEN2] jbossall-client-3.2.1.jar
[MAVEN2] jbossall-client-3.2.3.jar
[MAVEN2] jbossjmx-ant-3.2.3.jar
[MAVEN2] jnp-client-3.2.1.jar
[MAVEN2] jnp-client-4.0.2.jar
... or something like that. Which (if any) of the above JARs is most appropriate is hard to say.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With