Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.naming.NameNotFoundException error on WAS 6.1

Deboshree Roy
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 15
Flex Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you get the solution? I am facing the same issue....!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic