• 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
  • Jeanne Boyarsky
  • Tim Cooke
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Look up fails twice then works fine??!

Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Box: DELL with intel P2 Celeron, 128MB RAM,8GB HDD
App.server: WLS 6.1 eval
I am using a Home Look up factory to cache and return my home interfaces. Now, the problem is the look up fails for the first time. Saying "JNDI name unresolved" or displaying
and ASSERTION[****Must initialize before use****] error.Then If I run the client again, the look up gets thru and everything works fine.what could be the reason behinde this strage problem??
-please help-
If the code provides any help, it is the following.
public EJBHome getEJBHome(String serviceName, Class serviceClass)
throws ServiceLocatorException {
log("getEJBhome with "+ serviceName);
EJBHome home = (EJBHome) homeCache.get(serviceName);
if ( home == null ) {
log("getEJBHome new Required");
Object homeref = initialCtx.lookup (serviceName);
home = (EJBHome) javax.rmi.PortableRemoteObject.narrow ( homeref, serviceClass );
log("getEJBHome returning "+serviceName);
} catch (NamingException ex ) {
throw new ServiceLocatorException("Failed to look up the EJBHome for "+ serviceName + " object ",ex);
} catch (Exception ex) {
throw new ServiceLocatorException("Failed to return the EJBHome for "+ serviceName + " object ",ex);
return home;

Take care
It would give a normal human mental abilities to rival mine. To think it is just a tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic