Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Naming Exception  RSS feed

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

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 {
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--

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

at weblogic.rjvm.RJVMFinder.findOrCreate(
at weblogic.rjvm.ServerURL.findOrCreateRJVM(
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContex
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContex
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(
at com.ebag.espan.viewer.InvokingApplet.init(
at Source)
at Source)

Can anyone suggest a solution for this problem.?

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
Boost this thread!