File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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
Author

javax.naming.NameNotFoundException error on WAS 6.1

Deboshree Roy
Greenhorn

Joined: Oct 03, 2007
Posts: 21
Hi!

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");
aProperties.put(ACBusinessConstantsIF.CONTEXT_FACTORY_NAME,props.getProperty("grp.java.naming.factory.initial"));
Properties.put(ACBusinessConstantsIF.PROVIDER_URL,providerURL);
jndiName = props.getProperty(ACBusinessConstantsIF.GRP_JNDI_NAME);
}else{
aProperties = getContextProperties("AC_GRP_EJB_JNDI");
jndiName = aProperties.getProperty(ACBusinessConstantsIF.GRP_JNDI_NAME);
}



String factoryClassName = ACBusinessConstantsIF.FACTORY_NAME;
if (null == factoryClassName) {
} else {
try{
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();
message.setCode(ACBusinessConstantsIF.GRP_SERVICE_ERROR);
message.setDescription(ACBusinessConstantsIF.GRP_SERVICE_ERROR);
fatalException.addMessage(message);
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: IDLmg.org/CosNaming/NamingContext/NotFound:1.0]


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

Joined: Jun 25, 2012
Posts: 15

Did you get the solution? I am facing the same issue....!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.naming.NameNotFoundException error on WAS 6.1