• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Naming Exception

 
arya bhat
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.,

I ve this piece of code for the JNDI lookup in the Weblogic server 7.0 and i ve implemented this in the init() method of the Java Applet.I am getting the exception(in the client console) as given below.

This is the code:

Properties initialContextProperties = new Properties();
try {
initialContextProperties.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
String host=null;
InitialContext InitialContext;
String url = "t3://localhost:7001" ;
initialContextProperties.put(Context.PROVIDER_URL, url);
initialContextProperties.put(Context.SECURITY_PRINCIPAL, "xxx");
initialContextProperties.put(Context.SECURITY_CREDENTIALS, "yyy");
InitialContext = new InitialContext( initialContextProperties );
}catch( NamingException e ) {throw e;}


this is the exception i am getting--

throws:
javax.naming.CommunicationException. Root exception is java.net.ConnectException: No server found at T3://localhost:7001

at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:161)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:200)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContex tFactoryDelegate.java:195)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContex tFactoryDelegate.java:148)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory .java:123)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at com.ebag.espan.viewer.InvokingApplet.getConnection(InvokingApplet.java:165)
at com.ebag.espan.viewer.InvokingApplet.init(InvokingApplet.java:39)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Can anyone suggest a solution for this problem.?

Thanks..
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Substitute localhost with the IP address or hostname of your machine and see if it works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic