Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes EJB and other Java EE Technologies and the fly likes Naming Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Naming Exception" Watch "Naming Exception" New topic

Naming Exception

arya bhat

Joined: Jun 17, 2005
Posts: 2

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

Joined: Sep 29, 2002
Posts: 1683
Substitute localhost with the IP address or hostname of your machine and see if it works.

SCJP 1.4, SCWCD 1.3, SCBCD 1.3
I agree. Here's the link:
subject: Naming Exception