Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

javax.naming.NameNotFoundException error on WAS 6.1

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.
Posts: 15
Oracle Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you get the solution? I am facing the same issue....!
crispy bacon. crispy tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic