newbie question: ejb3 tutorial examples
ntk Aug 14, 2010 7:47 AMHello community,
I'm new to JBoss and the javaEE environment, and after playing around with the tutorials I have come across a problem with the java naming service (simple problem probably but still one I have found hard to overcome)
What I did:
1. I took the "Stateless" tutorial source code and created a .jar from it (without the Client.java).
2. I deployed the new .jar in my JBoss AS distribution, which is the latest JBoss 5 release. Restarted JBoss.
3. I checked if it is deployed correctly on the JBoss admin console.
4. I modified the Client.java the following way ( the underlined code is what I added ).
.... and I received the following exception:
Exception in thread "main" javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.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 org.jboss.tutorial.stateless.client.Client.main(Client.java:41)
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
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.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
... 5 more
What am I doing wrong?