You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Su...@blore.tcs.co.in on 2003/08/05 12:26:17 UTC

How do i resolve NoClassDefFoundError while deploying

Hi
I am trying to deploy a Test Servlet onto Weblogic so that I can use junit
test cases for testing my application.
My EJB is in a jar file named EJB.jar. The test.ear file has the EJB.jar
file in it. But when I try to deploy it, I get the following error
How do I resolve a NoClassDefFound Error?

     [java] 3   Activate        Failed  myserver        Server  test    C:
\bea\u
ser_projects\mydomain\.\myserver\upload\test\test.ear
     [java] Exception:weblogic.management.ApplicationException: Prepare
failed.
Task Id = 3
     [java]     Module: EJB.jar        Error: Exception preparing modul
e: EJBModule(EJB.jar,status=NEW)


     [java] Unable to deploy EJB: C:\bea\user_projects\mydomain\.
\myserver\.wlno
tdelete\test\EJB.jar from EJB.jar:

     [java] EJB : EHTaskProcessor .Unable to initialize method info fo
r remote or home interface.The error is java.lang.NoClassDefFoundError:
com/seic
/desktop/common/task/TaskRequestList
     [java]     at java.lang.Class.getMethods0(Native Method)
     [java]     at java.lang.Class.getMethods(Class.java:737)

The class it says it cannot find is a class in my application which is in
the App.jar file which is also present in test.ear.

I have a build.xml file, with 2 targets defined:
      deploy and deploy_test
"build deploy" works fine
"build deploy_test" fails with the error above.

Can anyone tell me how I must go about resolving it?? Is there some
specific path I  have to set?

regards
Sujaya


Re: How do i resolve NoClassDefFoundError while deploying

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
On Tue, 5 Aug 2003 08:26 pm, Sujaya_Narahari@blore.tcs.co.in wrote:
> Hi
> I am trying to deploy a Test Servlet onto Weblogic so that I can use junit
> test cases for testing my application.
> My EJB is in a jar file named EJB.jar. The test.ear file has the EJB.jar
> file in it. But when I try to deploy it, I get the following error
> How do I resolve a NoClassDefFound Error?

This doesn't appear to be an Ant issue. Have you tried contacting BEA support?

Conor



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: How do i resolve NoClassDefFoundError while deploying

Posted by Claudio Corsi <cc...@progress.com>.
Did you setup the Class-Path: attribute within the manifest file 
correctly for the EJB.jar file? Here is a link on how to do this
http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#JAR%20Manifest.

One thing to keep in mind is that the Class-Path: attribute is relative 
to where the EJB.jar file is located and not from where it is called.

Sujaya_Narahari@blore.tcs.co.in wrote:
> Hi
> I am trying to deploy a Test Servlet onto Weblogic so that I can use junit
> test cases for testing my application.
> My EJB is in a jar file named EJB.jar. The test.ear file has the EJB.jar
> file in it. But when I try to deploy it, I get the following error
> How do I resolve a NoClassDefFound Error?
> 
>      [java] 3   Activate        Failed  myserver        Server  test    C:
> \bea\u
> ser_projects\mydomain\.\myserver\upload\test\test.ear
>      [java] Exception:weblogic.management.ApplicationException: Prepare
> failed.
> Task Id = 3
>      [java]     Module: EJB.jar        Error: Exception preparing modul
> e: EJBModule(EJB.jar,status=NEW)
> 
> 
>      [java] Unable to deploy EJB: C:\bea\user_projects\mydomain\.
> \myserver\.wlno
> tdelete\test\EJB.jar from EJB.jar:
> 
>      [java] EJB : EHTaskProcessor .Unable to initialize method info fo
> r remote or home interface.The error is java.lang.NoClassDefFoundError:
> com/seic
> /desktop/common/task/TaskRequestList
>      [java]     at java.lang.Class.getMethods0(Native Method)
>      [java]     at java.lang.Class.getMethods(Class.java:737)
> 
> The class it says it cannot find is a class in my application which is in
> the App.jar file which is also present in test.ear.
> 
> I have a build.xml file, with 2 targets defined:
>       deploy and deploy_test
> "build deploy" works fine
> "build deploy_test" fails with the error above.
> 
> Can anyone tell me how I must go about resolving it?? Is there some
> specific path I  have to set?
> 
> regards
> Sujaya
> 
> 
> 
> ------------------------------------------------------------------------
> 
> The information contained in this message is likely to be confidential and may be legally privileged.  The dissemination, copying or disclosure of this message or its contents is strictly prohibited unless authorized by TATA CONSULTANCY SERVICES.  It is intended only for the person named as addressee.  If you have received this message in error, please immediately return it to sender at the above address without retaining any copy.  You may also contact on 91-080-2207506 the Head of IDM on this."
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org