I'm studying EJB3 and using JBoss 7 for this. I created a @Remote bean.
But I'm getting NullPointerException when executing the code below. But it works if instead I put the exactly same code in a servlet (doGet for example).
So it's not initializing the placeOrder variable ... How can I fix this? Thank you!
Exception in thread "main" javax.naming.NoInitialContextException: I get this: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
It seems that I need to start JBoss with the -b option. But I'm using Eclipse and I don't know to this in Eclipse.
Lucas Smith wrote:Maybe you have to add some .jars to the classpath of your client, especially when you use the client outside the container,
For example while using Glassfish there must be gf-client.jar.