• 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
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger
  • Frits Walraven

EJB Loca interface lookup problem with Websphere 6

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

Iam new to websphere 6, I try to lookup the Local Ejb in java Client as well as jspclient. I got the following error. please help me to solve the problem. but remote Interface working fine.

javax.naming.NameNotFoundException: Context: S6324Node01Cell/nodes/S6324Node01/s
ervers/myEJB, name: time: First component in name time not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0]
javax.naming.NameNotFoundException: Context: S6324Node01Cell/nodes/S6324Node01/servers/myEJB, name: time: First component in name time not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/Nami
ngContext/NotFound:1.0 at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHe
at m.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:132
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
at javax.naming.InitialContext.lookup(InitialContext.java:361)
at ejb.bind.ejbBindCheck.main(ejbBindCheck.java:87)


<?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">;
<ejb-jar id="ejb-jar_ID">
ejb-jar.xml for LocalizationDepwb component
<session id="Session_MyTime">
<description>An EJB named MyTimeBean</description>

JNDI Name = time

But both remote and local interface working fine in JBOSS server. please Help me to solve the problem..

Thanks lots.....
author and cow tipper
Posts: 5000
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, could you show us the code you're using to do the lookup. Does it look anything like this:

I have a tutorial on doing JNDI lookup with WebSphere, and how to work with JNDI clients. It might help you out:

Doing WebSphere JNDI Lookups with Local and Remote EJB Interfaces

Good luck!

-Cameron McKenzie
babujava jayaraman
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

this my client code.

public static void main(String a[]){
try {
/*************** WAS *************/
Properties p = new Properties();
p.put(javax.naming.Context.PROVIDER_URL, "iiop://";);
InitialContext context = new InitialContext(p);
System.out.println("=====context created finished.....");
Object result = ic.lookup("time");

System.out.println("lookup finished.....");
MyTimeLocal myTimeLocal = myTimeHomeLocal.create();
System.out.println("create finished.....");
String server_time = myTimeLocal.getTime();
System.out.println("SERVER TIME =: "+server_time);
catch (Exception e) {


session id="Session_MyTime">
description> An EJB named MyTimeBean /description>
display-name> MyTimeBeanName /display-name>
ejb-name> MyTimeBean </ejb-name>
local-home> mytimepak.MyTimeLocalHome /local-home>
local> mytimepak.MyTimeLocal /local>
ejb-class> mytimepak.MyTimeBean /ejb-class>
session-type> Stateless /session-type>
transaction-type> Container /transaction-type>

[ April 29, 2007: Message edited by: babujava jayaraman ]

[ April 29, 2007: Message edited by: babujava jayaraman ]
[ April 29, 2007: Message edited by: babujava jayaraman ]
I don't even know how to spell CIA. But this tiny ad does:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic