0 Replies Latest reply on May 21, 2017 9:13 AM by arnold benda

    javax.naming.NamingException: WFLYNAM0027: Failed instantiate InitialContextFactory

    arnold benda Newbie

      Hello sir.

      I am a beginner of java programming.

      I have a issue on developing web server.

      This is my code

       

       

          mEnv = {

                java.naming.provider.url=localhost:8080,

                 java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory,

                java.naming.security.authentication=simple,

                java.naming.security.principal=fc,

                java.naming.security.credentials=1234

      }

       

       

      private Hashtable mEnv = new Hashtable();

      InitialContext e = new InitialContext(mEnv);

      When I run above code I get such error.

       

       

       

       

      javax.naming.NamingException: WFLYNAM0027: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.cppro.war:main" from Service Module Loader [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory from [Module "deployment.cppro.war:main" from Service Module Loader]]

      java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory from [Module "deployment.cppro.war:main" from Service Module Loader]

      WFLYNAM0027: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.cppro.war:main" from Service Module Loader

      null

      null

      Please help me.

      Thanks