Cannot instantiate InitialContext with JBoss server

前端 未结 2 1591
情书的邮戳
情书的邮戳 2021-01-13 13:40

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

相关标签:
2条回答
  • 2021-01-13 13:57

    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.

    0 讨论(0)
  • 2021-01-13 14:05

    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.

    0 讨论(0)
提交回复
热议问题