"jaikiran" wrote : Have a look at:
|
|
http://wiki.jboss.org/wiki/Wiki.jsp?page=Getquotjavax.naming.NoInitialCon...
|
|
I just realized the real problem is:
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
i have changed my code to:
try{
InitialContext ic = new InitialContext();
ic.createSubcontext("Test");
System.out.println("pass");
System.out.println("pass");
}catch(Exception e){
System.out.println(e);
e.printStackTrace();
}
it having problem on this sentence: ic.createSubcontext("Test");
i have put jndi.properties into the classpath, this file contains:
# DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING
#
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
pls help!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981618#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...