• Post Reply Bookmark Topic Watch Topic
  • New Topic

ClassNotFoundException with Other Tiers  RSS feed

 
Ricky Veach
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hopefully this is the right place to ask this.

I have a EE Web program at work, that I am trying to bring home, so I can work on it in my free time. Unfortunately, we use a different program at work, then I can at home. We have RAD 7.5 at work and I can only get Eclipse at home, my version is 3.4.2.

So I have finally remade a new workspace in eclipse and copied all my source files over, and fixed any issues that result. I install tomcat 6 server and then start up the server and try to load the application.

The page starts to load fine, but then the console gets filled with ClassNotFoundExceptions from the other tiers when i start to run pages.

Jan 26, 2011 7:04:41 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: gov.ssa.ccbchangerequestform.domain.CcbControlTableInfo
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetPublicMethods(Unknown Source)
at java.lang.Class.getMethods(Unknown Source)
at java.beans.Introspector.getPublicDeclaredMethods(Unknown Source)
at java.beans.Introspector.getTargetMethodInfo(Unknown Source)
at java.beans.Introspector.getBeanInfo(Unknown Source)
at java.beans.Introspector.getBeanInfo(Unknown Source)
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptors(PropertyUtilsBean.java:896)
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptors(PropertyUtilsBean.java:926)
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:801)
at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1119)
at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686)
at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:290)
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:951)
at org.apache.struts.taglib.html.BaseFieldTag.prepareValue(BaseFieldTag.java:121)
at org.apache.struts.taglib.html.BaseFieldTag.renderInputElement(BaseFieldTag.java:102)
at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:81)
at org.apache.struts.taglib.html.HiddenTag.doStartTag(HiddenTag.java:75)
at org.apache.jsp.jsp.Main_jsp._jspx_meth_html_005fhidden_005f0(Main_jsp.java:262)
at org.apache.jsp.jsp.Main_jsp._jspx_meth_html_005fform_005f0(Main_jsp.java:162)
at org.apache.jsp.jsp.Main_jsp._jspService(Main_jsp.java:113)

If you don't know what I mean by tier, we seperate the Web , EAR, EJB, DAO (this is the database classes), and Domain (this is the transfer objects from the EJB to the DAO) into different projects we call tiers.

So why can't the web tier access anything outside of itself? This code works fine in RAD, so i know its either a conversion issue, a setting issue, or a server issue. There are no compile errors in the error tab of the workspace.

My .project file is referencing the other tiers:
<projects>
<project>ccbDomain</project>
<project>ccbRequestEJB</project>
</projects>

and so is my .classpath file:
<classpathentry combineaccessrules="false" kind="src" path="/ccbDomain"/>
<classpathentry combineaccessrules="false" kind="src" path="/ccbRequestEJB"/>

My EAR tier is referencing all the projects and ever tier references the domain tier.
When I add the application to the server, I notice it only lets me select the WEB tier. On RAD, it was the EAR that we added to the server.
When I try exporting the EAR file, and open it up, it does contain all the jar files from the other tiers including the WAR. So it seems weird it can't find them.

So what am I doing wrong?

The only way I have found to get around this issue right now is to Export the JAR files of the other tiers and put them into Web tier's lib folder. But this seems tedious, because I would need to do this every time I make a change.
 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You need to use the Application server to deploy EAR.

Regds,
Amit
 
Ricky Veach
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi amit.

After looking around and not knowing what you meant by "Application server", I came to a solution to solve my problem.

I came to my solution since you said I need to deploy the EAR and this showed my main problem was tomcat.
Tomcat doesn't support EJBs and such, which is why i was only able to deploy the Web tier, and not the EAR, and none of the other tiers could be found.
I installed JBoss 5 and ran the application on it, and everything worked fine without a problem.

Thanks for your help.
 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
As per your post I thought you must be aware of application server so did not explain it in detail.
Good that your problem got resolved.

regards,
amit
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!