javax.naming.NoInitialContextException: Cannot instantiate class: org.exolab.jms .jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6 57) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288 )


Samebug tips

This might be an issue with the file location in the Spark submit command. Try it with

spark-submit --master spark://master:7077 \
     hello_world_from_pyspark.py {file location}


7 months ago
Expert tip

Check if you've set a name in Application -> Run. If you didn't, the generated XML is gonna have missing information and then this exception will be thrown.


6 months ago
Expert tip

Solutions on the web

Solution icon of oraclecommunity
via Oracle Community by weepinsilence, 1 year ago
Cannot instantiate class: org.exolab.jms .jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6 57) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288 )

Solution icon of googlegroups
via Google Groups by Roberto, 1 year ago
Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: >>>>> org.jnp.interfaces.NamingContextFactory] at >>>>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657) at >>>>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)

Solution icon of googlegroups
via Google Groups by jug, 3 months ago
Cannot instantiate class: com.sun.enterprise.naming.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory] at javax.naming.spi.NamingManager.getInitialContext (NamingManager.java:657) at javax.naming.InitialContext.getDefaultInitCtx (InitialContext.java:288)

Solution icon of web
Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory] null at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674 ) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)

Solution icon of web
Cannot instantiate class: org.jasig.portal.jndi.PortalInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.jasig.portal.jndi.PortalInitialContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)

Solution icon of web
Cannot instantiate class: org.jasig.portal.jndi.PortalInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.jasig.portal.jndi.PortalInitialContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)

Solution icon of web
via nabble.com by Unknown author, 1 year ago
Cannot instantiate class: > >> org.activemq.jndi.ActiveMQInitialContextFactory [Root exception is > >> java.lang.ClassNotFoundException: > >> org.activemq.jndi.ActiveMQInitialContextFactory] at javax.naming.spi.NamingManager.getInitialContext(Unknown > >> Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown > Source)

Solution icon of web
via eclipse.org by Unknown author, 1 year ago
Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManag er.java:652) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext .java:243)

Solution icon of web
via entwickler-forum.de by Unknown author, 1 year ago
Cannot instantiate class: com.sun.jndi.fscontext.RefFSContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.fscontext.RefFSContextFactory] at javax.naming.spi.NamingManager.getInitialContext(U nknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unkn own Source)

Solution icon of sourceforge
Cannot instantiat e class: org.jnp.interfaces.NamingContextFactory \[Root exception is java.lang.Cl assNotFoundException: org.jnp.interfaces.NamingContextFactory\] at javax.naming.spi.NamingManager.getInitialContext(NamingManage r.java:657) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext. java:288)

Stack trace

javax.naming.NoInitialContextException: Cannot instantiate class: org.exolab.jms .jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextFactory]
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6 57)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288 )
	at javax.naming.InitialContext.init(InitialContext.java:223)
	at javax.naming.InitialContext.<init>(InitialContext.java:175)
	at SimpleMessageProducer.main(SimpleMessageProducer.java:49)
Caused by: java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextF actory
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:247)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

384 times, 2 days ago
3 times, 3 days ago
2 times, 1 week ago
209 times, 1 week ago
50 times, 1 week ago
1403 more bugmates