javax.naming.NoInitialContextException

Cannot instantiate class: com.sun.enterprise.naming.impl.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.impl.SerialInitContextFactory]


Samebug tips8

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web1238

Solution icon of web
Cannot instantiate class: com.sun.enterprise.naming.impl.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.impl.SerialInitContextFactory]

Solution icon of stackoverflow
Cannot instantiate class: com.sun.enterprise.naming.impl.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.impl.SerialInitContextFactory]

Solution icon of oraclecommunity
via Oracle Community by erpomata, 11 months ago
Cannot instantiate class: com.sun.enterprise.naming.impl.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.impl.SerialInitContextFactory]

Solution icon of stackoverflow
Cannot instantiate class: com.sun.enterprise.naming.impl.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.impl.SerialInitContextFactory]

Solution icon of web
Cannot instantiate class: com.sun.enterprise.naming.impl.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.impl.SerialInitContextFactory]

Solution icon of stackoverflow
Cannot instantiate class: com.sun.enterprise.naming.impl.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com/sun/enterprise/naming/impl/SerialInitContextFactory]

Solution icon of sourceforge
Cannot instantiate class: com.sun.enterprise.naming.impl.SerialInitContextFactory

Solution icon of oraclecommunity
via Oracle Community by 437791, 1 month ago
Cannot instantiate class: [Root exception is java.lang.ClassNotFoundException: ]

Solution icon of web
Cannot instantiate class: [Root exception is java.lang.ClassNotFoundException: ]

Solution icon of web
Cannot instantiate class: [Root exception is java.lang.ClassNotFoundException: ]

Stack trace

  • javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.enterprise.naming.impl.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.impl.SerialInitContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313) at javax.naming.InitialContext.init(InitialContext.java:244) at javax.naming.InitialContext.<init>(InitialContext.java:192) at com.gmail.physicistsarah.servertestclient.core.Main.main(Main.java:23) Caused by: java.lang.ClassNotFoundException: com.sun.enterprise.naming.impl.SerialInitContextFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:340) at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:72) at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:61) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) ... 4 more

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

Samebug visitor profile picture
Unknown user
Once, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
1200 more bugmates