[jboss-dev-forums] [EJB3 Development] - javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:

nandi g do-not-reply at jboss.com
Tue Nov 6 04:02:17 EST 2012


nandi g [https://community.jboss.org/people/ghosh_nandita] created the discussion

"javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:"

To view the discussion, visit: https://community.jboss.org/message/774975#774975

--------------------------------------------------------------
Hi

I am a new bie in EJB3.x .I am writing JUNIT test cases for ejb which is deployed in JBOSS7.1 FINAL using remote client.
I have used all the maven dependency  https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI
I have jboss-ejb-client.properties in my class path.

But i get the following error when i try to run the test cases.



----------------
+*javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:*+  java.naming.factory.initial
          at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
          at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
          at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
          at javax.naming.InitialContext.lookup(InitialContext.java:392
------------------



Attached is the jboss-ejb-clent.properties

Please help in solving this error
Thanks in advance
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/774975#774975]

Start a new discussion in EJB3 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2030]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20121106/961a6e93/attachment.html 


More information about the jboss-dev-forums mailing list