Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problem connecting to server from external client

0 views
Skip to first unread message

Josh Cimino

unread,
Nov 5, 2001, 10:15:08 AM11/5/01
to
I'm trying to connect to WebSphere from an external client to do some testing. When I try to get an InitialContext, I get the following error:
 
javax.naming.ServiceUnavailableException: NULL returned when resolving initial reference=NameService
 at com.ibm.ws.naming.util.WsnInitCtxFactory.getCosRootContext(WsnInitCtxFactory.java:452)
 at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:337)
 at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContext(WsnInitCtxFactory.java:200)
 at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:80)
 at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
 at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
 at javax.naming.InitialContext.init(InitialContext.java:222)
 at javax.naming.InitialContext.<init>(InitialContext.java:198)
 
The following code is how I try to get the InitialContext:
 
Properties lProperties = null;
InitialContext lInitialContext = null;
 
lProperties = new Properties();
lProperties.put( Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory" );
lProperties.put( Context.PROVIDER_URL, "iiop://localhost:900" );
lInitialContext = new InitialContext( lProperties );
 
Does anybody have an idea of what I'm doing wrong? Do I have to 'turn on' the NameService?
 
Thanks in advance,
 

Josh Cimino
Software Developer

Mxi Technologies Ltd.
1430 Blair Place, Suite 800
Ottawa, ON, Canada
K1J 9N2

E: josh....@mxi.com
T: 613.747.4698 ext 479
F: 613.747.1909
www.mxi.com

"From the flight line to the bottom line"

0 new messages