Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

"Empty" NoClassDefFoundError  RSS feed

 
Jonatan Samoocha
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't remember having seen this before:

Trying to run a session bean client from the command line leads to the following stack trace on invoking the remote method (skeleton):

Exception in thread "main" javax.ejb.EJBException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError; nested exception is: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError
at weblogic.ejb.container.internal.EJBRuntimeUtils.throwRemoteException( EJBRuntimeUtils.java:101)
at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemExceptio n(BaseRemoteObject.java:829)
at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemExceptio n(BaseRemoteObject.java:778)
at weblogic.ejb.container.internal.BaseRemoteObject.preInvoke(BaseRemote Object.java:258)
at weblogic.ejb.container.internal.StatelessRemoteObject.preInvoke(State lessRemoteObject.java:49)
at [PROPRIETETARY GENERATED CLIENT STUB].<init>)
at [PROPRIETETARY GENERATED CLIENT SKELETON].invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate dSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav a:475)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:5 9)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicSer verRef.java:1016)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172) Caused by: java.lang.NoClassDefFoundError
at [PROPPRIETARY SESSION BEAN IMPLEMENTATION CLASS].<init >(Unknown Source)


Since I don't see any logging taking place at the server, I assume the remote method call doesn't even make it to the server. Before going through all potential reasons for this failure, I'd like to understand why the NoClassDefFoundError does not specify which class' definition could not be found. Any ideas?

Many thanks,

Jonatan
 
Travis Hein
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could there be a misconfigured class name setting somewhere.

For example, if I used reflection to load a cass and didn't have a value for class name



So check in a .properties file, a .xml file, somewhere possibly even on the server for an empty tag or "class=" looking thing. Maybe there is a value that is missing from these files all together.
 
Jonatan Samoocha
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It happened to be a bit more complex: some configuration file in a "3rd party" .jar referenced class names of classes that were in _another_ "3rd party" .jar. The last one was missing on my classpath.

Thanks for your suggestion: it helped me search in the right direction.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!