-
1. Re: Proxy classes / NoClassDefFound
adrian.brock Aug 27, 2003 12:54 AM (in response to timshaw)This is probably a Class.forName() problem.
YOU HAVEN'T POSTED THE STACKTRACE!
If a class outside the war does Class.forName() while invoked
from the webapp it won't find classes in the war.
Regards,
Adrian -
2. Re: Proxy classes / NoClassDefFound
timshaw Aug 27, 2003 4:46 AM (in response to timshaw)Thanks for the reply. I've posted stack traces below.
The problem is that I need to deploy a Session EJB that uses classes from my war file. I can't put the EJB jar (just) into the war file as I can't then deploy it (they're all in an ear, and I need to ref the jar file from application.xml).
I've tried putting all the application classes into the EJB jar (as well as the war) but I get the same problem.
I suppose the question is really - How can I deploy an EJB from within a war file? This is what I want to do, and it makes sense as the Session EJB is part of the (logical) web app.
Thanks again
Below is : Deployment error, EJB jar file snippet, Management Console output for VideoTitle.
On Deployment :
11:18:17,035 INFO [EjbModule] Deploying ContentEJB
11:18:17,049 INFO [StatelessSessionContainer] Creating
11:18:17,059 WARN [ServiceController] Problem creating service jboss.j2ee:jndiName=local/Content,service=EJB
java.lang.NoClassDefFoundError: com/tripleplay/cdm/ca/form/VideoTitle
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:1627)
at java.lang.Class.privateGetPublicMethods(Class.java:1655)
at java.lang.Class.getMethods(Class.java:815)
at org.jboss.ejb.StatelessSessionContainer.setupBeanMapping(StatelessSessionContainer.java:540)
at org.jboss.ejb.StatelessSessionContainer.createService(StatelessSessionContainer.java:135)
at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
EJB Jar file snippet :
0 Wed Aug 27 11:18:12 BST 2003 META-INF/
55 Wed Aug 27 11:18:12 BST 2003 META-INF/MANIFEST.MF
0 Wed Aug 27 11:18:10 BST 2003 com/
0 Wed Aug 27 11:18:10 BST 2003 com/tripleplay/
0 Wed Aug 27 11:18:10 BST 2003 com/tripleplay/cdm/
0 Wed Aug 27 11:18:12 BST 2003 com/tripleplay/cdm/ca/
0 Wed Aug 27 11:18:12 BST 2003 com/tripleplay/cdm/ca/ejb/
0 Wed Aug 27 11:18:12 BST 2003 com/tripleplay/cdm/ca/form/
0 Wed Aug 27 11:18:12 BST 2003 com/tripleplay/cdm/ca/action/
0 Wed Aug 27 11:18:12 BST 2003 com/tripleplay/cdm/ca/web/
2608 Wed Aug 27 11:18:10 BST 2003 application.properties
285 Wed Aug 27 11:18:10 BST 2003 com/tripleplay/cdm/ca/ejb/LocalContentHome.class
583 Wed Aug 27 11:18:10 BST 2003 com/tripleplay/cdm/ca/ejb/LocalContent.class
11155 Wed Aug 27 11:18:12 BST 2003 com/tripleplay/cdm/ca/ejb/ContentBean.class
6927 Wed Aug 27 11:18:10 BST 2003 com/tripleplay/cdm/ca/form/VideoTitle.class
2086 Wed Aug 27 11:18:10 BST 2003 com/tripleplay/cdm/ca/form/Language.class
1570 Wed Aug 27 11:18:12 BST 2003 com/tripleplay/cdm/ca/form/Category.class
Management Console :
com.tripleplay.cdm.ca.form.VideoTitle Information
Not loaded in repository cache
### Instance0 found in UCL: org.jboss.mx.loading.UnifiedClassLoader3@14005e1{ url=file:/home/tim/programs/jboss-3.2.1_tomcat-4.1.24/server/default/tmp/deploy/server/default/deploy/ContentDistributionManager.ear/54.ContentDistributionManager.ear ,addedOrder=33} -
3. Re: Proxy classes / NoClassDefFound
timshaw Aug 27, 2003 5:17 AM (in response to timshaw)Sort of answered my own question by adding all the struts jars to the Session EJB jar file. I guess the NoClassDefFound was generated as it couldn't find the super-class.
Thanks for your time
tim