[jboss-jira] [JBoss JIRA] (WFLY-5345) Remote client EJB IIOP lookup fails when wfly context factory lookup is used

Ondřej Chaloupka (JIRA) issues at jboss.org
Tue Sep 15 06:28:00 EDT 2015


    [ https://issues.jboss.org/browse/WFLY-5345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108602#comment-13108602 ] 

Ondřej Chaloupka commented on WFLY-5345:
----------------------------------------

Suggestion for reproducer contained at JBEAP-1071

> Remote client EJB IIOP lookup fails when wfly context factory lookup is used
> ----------------------------------------------------------------------------
>
>                 Key: WFLY-5345
>                 URL: https://issues.jboss.org/browse/WFLY-5345
>             Project: WildFly
>          Issue Type: Bug
>          Components: IIOP
>    Affects Versions: 10.0.0.Beta2
>            Reporter: Ondřej Chaloupka
>            Assignee: Tomasz Adamski
>            Priority: Critical
>
> I'm not 100% sure that this is a bug as there could be some misconfiguration from my side. Plus I do not know if wildfly-iiop-openjdk is expected to be used on client side.
> When I try to use ejb lookup from client side with usage of IIOP
> {code}
>         System.setProperty("com.sun.CORBA.ORBUseDynamicStub", "true");
>         final Properties prope = new Properties();
>         prope.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.iiop.openjdk.naming.jndi.CNCtxFactory");
>         prope.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.iiop.naming:org.jboss.naming.client");
>         prope.put(Context.PROVIDER_URL, "corbaloc::" + serverName +":3528/JBoss/Naming/root");
>         final InitialContext context = new InitialContext(prope);
>         final Object ejbHome = context.lookup(beanClass.getSimpleName());
>         return homeClass.cast(PortableRemoteObject.narrow(ejbHome, homeClass));
> {code}
> I get exception
> {code}
> java.lang.NullPointerException: null
>  at org.wildfly.iiop.openjdk.service.CorbaORBService.getCurrent(CorbaORBService.java:222)
>  at org.wildfly.iiop.openjdk.naming.jndi.CNCtx.initOrbAndRootContext(CNCtx.java:227)
>  at org.wildfly.iiop.openjdk.naming.jndi.CNCtx.<init>(CNCtx.java:99)
>  at org.wildfly.iiop.openjdk.naming.jndi.CNCtxFactory.getInitialContext(CNCtxFactory.java:53)
>  at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
>  at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
>  at javax.naming.InitialContext.init(InitialContext.java:244)
>  at javax.naming.InitialContext.<init>(InitialContext.java:216)
>  at org.jboss.as.test.jbossts.client.utils.TxUtil.lookupIIOP(TxUtil.java:90)
> {code}
> If I use the context factory class from my local java 8 oracle jdk/open jdk {{com.sun.jndi.cosnaming.CNCtxFactory}} then it works fine.
> I can see that the {{NullPointerException}} is thrown from here
> https://github.com/wildfly/wildfly/blob/master/iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/service/CorbaORBService.java#L277
> which pointing me to suspicion that the iiop library expects a WFLY running to get service registry. But it is not available on client side.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the jboss-jira mailing list