I\'m trying to create a InitialContext
so I could ask the JNDI for some enterprise java beans.
The JBoss is running fine, but when I run the java code I get an
I had the same problem but I found how to fix it. All you have to do is add the jbossall-client.jar library to the clients project, and done!!! You can find the file inside the client folder. e.g jboss-6.1.0.Final_GPT\client I was using Jboss 6.1.0 You can also get help from this link https://community.oracle.com/thread/1157701?start=0
Hope it helps.
The InitialContext properties are not right for the JBoss version that you are using. With JBoss 7, things have changed considerably when you call a ejb from a remote client. This link can help you to instantiate correctly the InitialContex object and to determine the JNDI entry name. Also will tell you what are the necessary dependencies that need to be added to the client classpath.