Hi to all
I am developing a web applicatoin on Struts Framework using WSAD 5.1 The problem I got is when I try to call an EJB home from my Struts action class, I always got NoClassDefFoundError. Any idea what will cause this error?
Caused by: java.lang.NoClassDefFoundError: businessCalendarService.BusinessCalendarServiceHome
at poc.actions.BCSAction.numberOfWorkingDays(BCSAction.java:86)
-
NoClassDefFoundError when calling home interface from Action (3 messages)
- Posted by: Solo Chiang
- Posted on: March 06 2005 12:10 EST
Threaded Messages (3)
- NoClassDefFoundError when calling home interface from Action by Michael Lavelle on March 06 2005 13:07 EST
- NoClassDefFoundError when calling home interface from Action by Bill Lasley on March 07 2005 12:07 EST
- NoClassDefFoundError when calling home interface from Action by thiagu chanderasekaran on July 14 2005 16:09 EDT
-
NoClassDefFoundError when calling home interface from Action[ Go to top ]
- Posted by: Michael Lavelle
- Posted on: March 06 2005 13:07 EST
- in response to Solo Chiang
Hi to allI am developing a web applicatoin on Struts Framework using WSAD 5.1 The problem I got is when I try to call an EJB home from my Struts action class, I always got NoClassDefFoundError. Any idea what will cause this error? Caused by: java.lang.NoClassDefFoundError: businessCalendarService.BusinessCalendarServiceHome at poc.actions.BCSAction.numberOfWorkingDays(BCSAction.java:86)
Hi there
You'll need to have the your EJB classes (eg. the BusinessCalendarServiceHome class) in the WEB-INF directory of your web application, either in the classes directory or packaged into a jar file in the lib directory.
Although in this case the class that is missing is one of your own classes, when getting a NoClassDefFoundError message which refers to a third party class, you can also try using Jarhoo (http://www.jarhoo.com) to find which jar file you need in your classpath.
Michael -
NoClassDefFoundError when calling home interface from Action[ Go to top ]
- Posted by: Bill Lasley
- Posted on: March 07 2005 12:07 EST
- in response to Michael Lavelle
If the EJB module is in the same enterprise application as your web module, you need only put the EJB module name on the web module's Manifest Class-Path. In WSAD, open the web application project properties. Select Java JAR Dependencies. Select the JAR (EJB project) that your EJB is in. WSAD will make an entry on the Web module's MANIFEST.MF class path.
Bill Lasley
Versant Corp.
http://www.versant.com -
NoClassDefFoundError when calling home interface from Action[ Go to top ]
- Posted by: thiagu chanderasekaran
- Posted on: July 14 2005 16:09 EDT
- in response to Solo Chiang
Were you able to find a solution to this issue, I'm facing the same problem
Thanking you in advance,
Thanks