Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

javax.naming. NameNotFoundException

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to EJB i am using Weblogic6.1,Windows 2000, j2ee1.3, j2sdk1.4.
When i run my client
Exception thrown is

package examples;
import javax.ejb.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import java.util.Properties;
// Example of Client Code invokes methods on a simple
// stateless session bean;
public class HelloClient{
public static void main(String[] args)
Properties props = System.getProperties();
Context ctx = new InitialContext(props);
System.out.println(" 3 ");
Object obj = ctx.lookup("Hello");
System.out.println(" 4 ");
HelloHome home = (HelloHome)javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
System.out.println(" 5 ");
Hello hello = home.create();
}catch(Exception e){
System.out.println("the error is " + e);

<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'

<?xml version="1.0"?>
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
thanks in advance

Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you remember to set the target for your ejb? If so, did you confirm your ejb deployed successfully in weblogic? You can do this by looking in the weblogic.log for your server.
Could a moderator move this to the WebLogic Forum?
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!