• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError on the managed server which comes up second ... ??

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have a cluster on weblogic 8.1 sp6 with two managed servers and when I deploy my application onto that I get NoClassDefFoundError while looking up (jndi lookup) the session bean on the managed server which comes up second.

I have checked the JNDI trees on both servers and they look good and I have checked that the application(and EJB) are deployed on both the managed servers through the admin server console.

The client that I am trying to look up from is deployed on another ear (diff. application).

Also there are some other beans deployed on the same ear which I am able to look up.

If I deploy this application on a cluster where both the managed servers are on the same machine and then start both managed servers through admin console, they come up simultaneously and I don't get any issue on both the servers, but even on this machine if i start one managed server first and then the second one, I am getting this problem on the server which comes up second.

Why is this problem always occurring on the managed server which comes up second, it works well on the first one?

Also this application works well on a single server deployment.

Here is the stack trace:

java.lang.NoClassDefFoundError: com/cc/aa/ejb/obj/HHLocalHome at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:1655) at java.lang.Class.getMethod0(Class.java:1901) at java.lang.Class.getMethod(Class.java:984) at com.cc.aa.service.data.dd.am.ejb.AcMa_sbdv2o_HomeImpl.(AcMa_sbdv2o_HomeImpl.java:231) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:277) at weblogic.j2ee.ApplicationManager.loadClassWithNoDependencyClassLoader(ApplicationManager.java:233) at weblogic.rmi.cluster.ReplicaAwareRemoteObject.getPrimaryRepresentative(ReplicaAwareRemoteObject.java:92) at weblogic.rmi.cluster.ClusterableRemoteObject.getReferent(ClusterableRemoteObject.java:109) at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:90) at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:292) at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:798) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196) at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:258) at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:363) at javax.naming.InitialContext.lookup(InitialContext.java:347) at com.cc.aa.tool.loc.BeanLocator.getObjFromJndi(BeanLocator.java:321) at ........

This stack trace come on the first hit when the second server comes up. Here HHLocalHome is the local home class for an entity bean which is referred in the "AcMaBean" which is the session bean whose lookup fails. Ejb jars for the entity bea and the session bean are packaged in same ear.


Here is the stack trace for NoClassDefFoundError which occurs at lookup for the "AcMaBean" session bean on all the subsequent hits to the second server:


java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:277) at weblogic.j2ee.ApplicationManager.loadClassWithNoDependencyClassLoader(ApplicationManager.java:233) at weblogic.rmi.cluster.ReplicaAwareRemoteObject.getPrimaryRepresentative(ReplicaAwareRemoteObject.java:92) at weblogic.rmi.cluster.ClusterableRemoteObject.getReferent(ClusterableRemoteObject.java:109) at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:90) at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:292) at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:798) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196) at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:258) at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:363) at javax.naming.InitialContext.lookup(InitialContext.java:347) at com.cc.aa.tool.loc.BeanLocator.getObjFromJndi(BeanLocator.java:321) at ......


Please suggest what can be done to resolve this issue, any help will really be appreciated.
 
reply
    Bookmark Topic Watch Topic
  • New Topic