Deployment Nightmare: NoClassDefinitionError
john_anderson_ii Jul 1, 2004 4:51 PMI'm experiencing a very strange problem.
[JBoss 3.2.3, Windows 2000, j2sdk 1.4.2_04]
My application used to look like this and everything worked fine, including accessing org.jcallcenter.supporing.core.EJBNameFactory
org.jcallcenter.ejb.core //beans
+ TicketBean.class //cmp bean
+ TicketFacadeBean.class //session bean
org.jcallcenter.interfaces.core //interfaces
+ TicketLocalHome //Ticket Bean's local home
+ TicketHome //Ticket Bean's home
+ TicketFacade //TicketFacadeBean's remote
+ TicketFacadeHome //TicketFacadeBean's Home
org.jcallcenter.web.core
+ TicketServlet.class //class to test Ticket CMP
org.jcallcenter.supporting.core
+ EJBNameFactory //a class with public strings to hold JNDI names
It was packaged like this:
JCallCenter.ear
+JCallCenterEJB.jar
++JCallCenter/bin/org/jcallcenter/ejb/core/*
++JCallcenter/bin/org/jcallcenter/interfaces/core/*
++JCallCenter/supporting.jar => lib/
+++JCallCenter/bin/org/jcallcenter/supporting/core/*
++JCallCenter/src/META-INF/* => META-INF/
+JCallCenterWEB.war
++JCallCenter/bin/org/jcallcenter/web/core/* => WEB-INF/classes
++JCallCenter/src/WEB-INF/* => WEB-INF/
++JCallCenter/src/docroot/*
++JCallCenter/JCallCenterEJB-Client.jar => WEB-INF/lib
+JCallCenter/src/META-INF/application.xml => META-INF/
(God I hope that made sense!)
Anyway, I then expanded the project by adding another entity bean and another supporting class. This supporing class is really just a little DataType. So now my application looks like this:
org.jcallcenter.ejb.core //beans
+ TicketBean.class //cmp bean
+ CountryBean.class //cmp bean
+ TicketFacadeBean.class //session bean
+ CountryFacadeBean.class //session bean
org.jcallcenter.interfaces.core //interfaces
+ TicketLocalHome //Ticket Bean's local home
+ TicketHome //Ticket Bean's home
+ TicketFacade //TicketFacadeBean's remote
+ TicketFacadeHome //TicketFacadeBean's Home
+ CountryLocalHome //CountryBean's Local Home
+ CountryHome //CountryBean's Home
+ CountryFacade //CountryFacadeBean's Remote
+ CountryFacadeHome //CountryFacadeBean's Home
org.jcallcenter.web.core
+ TicketServlet.class //class to test Ticket CMP
+ CountryServlet.class //class to test Country CMP and CountryData
org.jcallcenter.supporting.core
+ EJBNameFactory //a class with public strings to hold JNDI names
+ CountryData.class //A class that can hold CountryBean's values
It's packaged the exacty same way. On deployment a NoClassDefinitionError is thrown when JBoss tries to verify CountryData! It never had a problem finding EJBNameFactory in the class path! Any ideas or suggestions? I've also tried putting supporting.jar into default/lib and restarting JBoss, but it still throws the error! One other peculiar thing...the error is
java.lang.NoClassDefFoundError: [Lorg/jcallcenter/supporting/core/CountryData; at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:1647) at java.lang.Class.privateGetPublicMethods(Class.java:1770) at java.lang.Class.getMethods(Class.java:824) at org.jboss.verifier.strategy.AbstractVerifier.hasEJBCreateMethod(AbstractVerifier.java:688) ******************SNIP**************************
Where did the [L come from before org/jcallcenter/supporting/core/CountryData ?