Getquotjavax.naming.NoInitialContextExceptionquot

    Problem:

     

    You see:

     

    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resourcefile: java.naming.factory.initial

     

    Solution:

     

    Place a jndi.properties file in your classpath. A typical jndi.properties file contains:

     

     

    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces java.naming.provider.url=jnp://localhost:1099

     

    Referenced by: