NullPointerException when trying to use org.wildfly.iiop.openjdk.naming.jndi.CNCtxFactory in standalone java client to connect to JBoss EAP 7 IIOP

Solution Verified - Updated -

Issue

  • Getting NullPointerException in org.wildfly.iiop.openjdk.service.CorbaORBService.getCurrent in JBoss EAP 7 when trying to create IIOP InitialContext using org.wildfly.iiop.openjdk.naming.jndi.CNCtxFactory
     [java] java.lang.NullPointerException
     [java]     at org.wildfly.iiop.openjdk.service.CorbaORBService.getCurrent(CorbaORBService.java:222)
     [java]     at orgPrinting stacktrace for: null
     [java] .wildfly.iiop.openjdk.naming.jndi.CNCtx.initOrbAndRootContext(CNCtx.java:227)
     [java]     at org.wildfly.iiop.openjdk.naming.jndi.CNCtx.<init>(CNCtx.java:99)
     [java]     at org.wildfly.iiop.openjdk.naming.jndi.CNCtxFactory.getInitialContext(CNCtxFactory.java:53)
     [java]     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
     [java]     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
     [java]     at javax.naming.InitialContext.init(InitialContext.java:244)
     [java]     at javax.naming.InitialContext.<init>(InitialContext.java:216)
     [java]     at com.jboss.examples.ejb3.iiop.client.JDKClient.getIIOPInitialContext(JDKClient.java:211)

Environment

Red Hat JBoss Enterprise Application Platform (EAP) 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content