This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Exception when invoking standalone client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Exception when invoking standalone client" Watch "Exception when invoking standalone client" New topic

Exception when invoking standalone client

Ajay Divakaran

Joined: Jul 08, 2007
Posts: 22
How do I rectify this error?

java Client.SimpleSessionClient

Exception in thread "main" javax.naming.NoInitialContextException: Cannot instan
tiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lan
g.ClassNotFoundException: org.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.SimpleSessionClient.main(
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFac
at$ Source)
at Method)
at 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
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

By adding the jar-files from the 'JBOSS_HOME/client' folder, to the java classpath.

Regards, Rene Larsen
Dropbox Invite
I agree. Here's the link:
subject: Exception when invoking standalone client
It's not a secret anymore!