2 Replies Latest reply on Apr 9, 2013 10:13 AM by amittelang1976

    Error on ContextInitialization failed

    amittelang1976

      Hi,

       

      Project is migrating from Weblogic to Jboss As 7. While doing JMS changes I am getting following Error :-

       

       

       

       

       

      15:29:17,569 INFO  [stdout] (MSC service thread 1-6) Caused by: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "deployment.fiveseries.war:main" from Service Module Loader

      15:29:17,569 INFO  [stdout] (MSC service thread 1-6)  at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)

      15:29:17,569 INFO  [stdout] (MSC service thread 1-6)  at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)

      15:29:17,569 INFO  [stdout] (MSC service thread 1-6)  at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)

      15:29:17,569 INFO  [stdout] (MSC service thread 1-6)  at javax.naming.InitialContext.init(Unknown Source)

      15:29:17,569 INFO  [stdout] (MSC service thread 1-6)  at javax.naming.InitialContext.<init>(Unknown Source)

      15:29:17,569 INFO  [stdout] (MSC service thread 1-6)  at org.springframework.jndi.JndiTemplate.createInitialContext(JndiTemplate.java:136)

       

      My Code is as follows:-

       

      Properties props = new Properties();

      props.setProperty("java.naming.factory.initial",    "org.jboss.naming.remote.client.InitialContextFactory");

       

      props.setProperty("java.naming.provider.url", "remote://localhost:4447");

       

      I checked the port is also correct. Not sure why its giving failed to instantiate.

       

      Thanks for your help in advance.

       

      Thanks,

      Amit Telang