[jboss-jira] [JBoss JIRA] (WFLY-11856) WildFlyInitialContext is not working and throw a NoInitialContextException for a lookup
Tomasz Adamski (Jira)
issues at jboss.org
Fri Mar 15 15:41:00 EDT 2019
Tomasz Adamski created WFLY-11856:
-------------------------------------
Summary: WildFlyInitialContext is not working and throw a NoInitialContextException for a lookup
Key: WFLY-11856
URL: https://issues.jboss.org/browse/WFLY-11856
Project: WildFly
Issue Type: Bug
Components: EJB
Reporter: Tomasz Adamski
Assignee: Tomasz Adamski
Fix For: 17.0.0.Beta1
As per documentation (https://github.com/wildfly/wildfly-naming-client#usage)
the standard discovery can be bypassed with
InitialContext ctx = new WildFlyInitialContext();
Blah blah = (Blah) ctx.lookup("foo:blah");
But this aproach will fail with the following Exception:
Exception in thread "main" javax.naming.NoInitialContextException
at org.wildfly.naming.client.WildFlyInitialContext.getDefaultInitCtx(WildFlyInitialContext.java:65)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:350)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.jboss.wfink.eap71.playground.client.SimpleWildFlyInitialContextClient.main(SimpleWildFlyInitialContextClient.java:41)
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list