Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NoClassDefFoundError on the managed server which comes up second ..

Status
Not open for further replies.

ranagaurav

Programmer
Jun 23, 2008
1
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top