File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes javax.naming.NameNotFoundException error on WAS 6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "javax.naming.NameNotFoundException error on WAS 6.1" Watch "javax.naming.NameNotFoundException error on WAS 6.1" New topic

javax.naming.NameNotFoundException error on WAS 6.1

Deboshree Roy

Joined: Oct 03, 2007
Posts: 21

I am trying to look up another application(say A) from the EJB code of my application(say B) by exposing the API of that application in my application.
This was working fine in 5.1 environment. Bur faltering on 6.1.
The EJB version in my application is 2.1 on both the applications now.This is code which is used in my servicelocator to look up application A:

props = readerUtil.getProperyByName(ACBusinessConstantsIF.EJB_CONFIG_FILE_NAME);
if(null != props)
Context ctx = new InitialContext();
String providerURL= (String)ctx.lookup("AC_GRP_EJB_JNDI");
jndiName = props.getProperty(ACBusinessConstantsIF.GRP_JNDI_NAME);
aProperties = getContextProperties("AC_GRP_EJB_JNDI");
jndiName = aProperties.getProperty(ACBusinessConstantsIF.GRP_JNDI_NAME);

String factoryClassName = ACBusinessConstantsIF.FACTORY_NAME;
if (null == factoryClassName) {
} else {
System.out.println("********null != props*******9****");
Object obj = (((ACServiceLocator) Class.forName(factoryClassName)
.newInstance()).initialize(aProperties, jndiName)).create();
System.out.println("********null != props******10*****");
GroupManagementHome groupMgmtHome = (GroupManagementHome) PortableRemoteObject
.narrow(obj, GroupManagementHome.class);
System.out.println("********null != props******11*****");
services = (GroupManagement) groupMgmtHome.create();
System.out.println("********null != props******12*****");
}catch(Exception ex){
System.out.println("*********In catch of ServcieLocator*****"+ex);
ACFatalException fatalException = new ACFatalException();
ACMessage message = new ACMessage();
throw fatalException;

The application is faltering at the GroupManagementHome lookup(after the sysout 9).
This is the error that I have located in the logs:

javax.naming.NameNotFoundException: Context: ukdev3ptlshe/clusters/WPTL, name: ejb/com/marsh/groupmanagement/services/GroupManagementSOAPImpl: First component in name marsh/groupmanagement/services/GroupManagementSOAPImpl not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound:]

Could Anybody suggest what could be the probable issue for this error.
sairam Kukudala

Joined: Jun 25, 2012
Posts: 15

Did you get the solution? I am facing the same issue....!
I agree. Here's the link:
subject: javax.naming.NameNotFoundException error on WAS 6.1
It's not a secret anymore!