I'm trying to move an ear file from JBoss 5.1 EAP to 6.1. I'm getting this issue when I try to use an EJB: NamingException JBAS011843: Failed instantiate InitialContextFactory com.sun.jndi.cosnaming.CNCtxFactory from classloader ModuleClassLoader for Module "deployment.my.ear.my.war:main" from Service Module Loader 13:34:14,304
INFO [stdout] javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory com.sun.jndi.cosnaming.CNCtxFactory from classloader ModuleClassLoader for Module "deployment.my.ear.my.war:main" from Service Module Loader 13:34:14,304
INFO [stdout] at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64) 13:34:14,304
INFO [stdout] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681) 13:34:14,305 INFO [stdout]
The code this error comes from is: new InitialContext("{java.naming.provider.url=corbaloc::server:port, java.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory}");
This worked fine on JBoss 5.1, but not 6.1. I checked and that class exists on 6.1, not sure why I am getting this error. Also, this is moving from JDK 6 to JDK 7. |