You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kor Kiley <ko...@uvm.edu> on 2005/03/01 18:56:04 UTC

Build fails with java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

I'm trying to just do a basic install. They build fails with "Exception 
in thread "main" java.lang.NoClassDefFoundError: 
org/apache/tools/ant/launch/Launcher"  I searched the archives for 
similar subjects but was unsuccessfull finding my specific problem.  
Here is my setup:

OS: Red Hat Enterprise Linux 3
JDK: j2sdk-1.4.2_07-fcs
ant-1.5.2-23
cocoon 2.1.6

I untarred cocoon into my home directory and have tried the build both 
as my and as root.

I've not yet installed tomcat but that doesn't seem necessary for the 
initial build.

Alternatives changes I made:

java - status is auto.
 link currently points to /usr/java/j2sdk1.4.2_07/bin/java
/usr/share/java/libgcj-java-placeholder.sh - priority 100
 slave rmiregistry: /usr/bin/grmiregistry
 slave rmiregistry.1: (null)
 slave rmiregistry.1.gz: /usr/share/man/man1/grmiregistry.1.gz
/usr/java/j2sdk1.4.2_07/bin/java - priority 300
 slave rmiregistry: /usr/java/j2sdk1.4.2_07/bin/rmiregistry
 slave rmiregistry.1: /usr/java/j2sdk1.4.2_07/man/man1/rmiregistry.1
 slave rmiregistry.1.gz: (null)
Current `best' version is /usr/java/j2sdk1.4.2_07/bin/java.

javac - status is auto.
 link currently points to /usr/java/j2sdk1.4.2_07/bin/javac
/usr/share/java/libgcj-java-placeholder.sh - priority 100
 slave jar: /usr/bin/gjar
 slave rmic: /usr/bin/grmic
 slave jar.1: (null)
 slave jar.1.gz: /usr/share/man/man1/gjar.1.gz
 slave rmic.1: (null)
 slave rmic.1.gz: /usr/share/man/man1/grmic.1.gz
/usr/share/java/libgcj-javac-placeholder.sh - priority 100
 slave jar: /usr/bin/gjar
 slave rmic: /usr/bin/grmic
 slave jar.1: (null)
 slave jar.1.gz: /usr/share/man/man1/gjar.1.gz
 slave rmic.1: (null)
 slave rmic.1.gz: /usr/share/man/man1/grmic.1.gz
/usr/java/j2sdk1.4.2_07/bin/javac - priority 300
 slave jar: /usr/java/j2sdk1.4.2_07/bin/jar
 slave rmic: /usr/java/j2sdk1.4.2_07/bin/rmic
 slave jar.1: /usr/java/j2sdk1.4.2_07/man/man1/jar.1
 slave jar.1.gz: (null)
 slave rmic.1: /usr/java/j2sdk1.4.2_07/man/man1/rmic.1
 slave rmic.1.gz: (null)
Current `best' version is /usr/java/j2sdk1.4.2_07/bin/javac.

I created %JAVA_HOME%/jre/lib/endorsed and copied 
xalan-2.6.1-dev-20041008T0304.jar, xercesImpl-2.6.2., xml-apis.jar from 
./lib/endorsed to this new directory although this seems to be 
irrelevant for the build process since the build script sets its 
CLASSPATH to ./lib/endorsed anyway.

I searched the jar files in ./lib/endorsed for 
org/apache/tools/ant/launch/Launcher and that path didn't exist!

I'm sure there is a simple solution to this problem as my knowledge of 
java is limited to learning some basic programming up to this point.  
Any help will be very much appreciated.

Kor Kiley
Library Systems
University of Vermont




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Build fails with java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

Posted by Kor Kiley <ko...@uvm.edu>.
Thanks Scott!

I uninstalled my version of ant and was able to build cocoon  I looked 
at the build script and didn't think it should be necessary to remove 
any reference to ant but there you have it!

Kor

Scott Yeadon wrote:

> The problem could be that the ant shipped with your OS (I'm guessing 
> you're using Linux & probably RedHat) is still being run - disable the 
> ANT_HOME line in the /etc/ant.conf file if it's there. Also ensure the 
> system-deployed ant does not appear in your path.
>
> Kor Kiley wrote:
>
>> Thanks Gregor.  I already did this.  I did not use ant directly.
>>
>> Kor
>>
>> Gregor J. Rothfuss wrote:
>>
>>> Kor Kiley wrote:
>>>
>>>> I'm trying to just do a basic install. They build fails with 
>>>> "Exception in thread "main" java.lang.NoClassDefFoundError: 
>>>> org/apache/tools/ant/launch/Launcher"  I searched the archives for 
>>>> similar subjects but was unsuccessfull finding my specific 
>>>> problem.  Here is my setup:
>>>
>>>
>>>
>>>
>>> use build.sh instead of ant directly. it will use the ant shipped 
>>> with cocoon (yours is out of date anyway)
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Build fails with java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

Posted by Scott Yeadon <sc...@anu.edu.au>.
The problem could be that the ant shipped with your OS (I'm guessing 
you're using Linux & probably RedHat) is still being run - disable the 
ANT_HOME line in the /etc/ant.conf file if it's there. Also ensure the 
system-deployed ant does not appear in your path.

Kor Kiley wrote:

> Thanks Gregor.  I already did this.  I did not use ant directly.
>
> Kor
>
> Gregor J. Rothfuss wrote:
>
>> Kor Kiley wrote:
>>
>>> I'm trying to just do a basic install. They build fails with 
>>> "Exception in thread "main" java.lang.NoClassDefFoundError: 
>>> org/apache/tools/ant/launch/Launcher"  I searched the archives for 
>>> similar subjects but was unsuccessfull finding my specific problem.  
>>> Here is my setup:
>>
>>
>>
>> use build.sh instead of ant directly. it will use the ant shipped 
>> with cocoon (yours is out of date anyway)
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Build fails with java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

Posted by Kor Kiley <ko...@uvm.edu>.
Thanks Gregor.  I already did this.  I did not use ant directly.

Kor

Gregor J. Rothfuss wrote:

> Kor Kiley wrote:
>
>> I'm trying to just do a basic install. They build fails with 
>> "Exception in thread "main" java.lang.NoClassDefFoundError: 
>> org/apache/tools/ant/launch/Launcher"  I searched the archives for 
>> similar subjects but was unsuccessfull finding my specific problem.  
>> Here is my setup:
>
>
> use build.sh instead of ant directly. it will use the ant shipped with 
> cocoon (yours is out of date anyway)
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Build fails with java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Kor Kiley wrote:
> I'm trying to just do a basic install. They build fails with "Exception 
> in thread "main" java.lang.NoClassDefFoundError: 
> org/apache/tools/ant/launch/Launcher"  I searched the archives for 
> similar subjects but was unsuccessfull finding my specific problem.  
> Here is my setup:

use build.sh instead of ant directly. it will use the ant shipped with 
cocoon (yours is out of date anyway)

-- 
Gregor J. Rothfuss
COO, Wyona       Content Management Solutions    http://wyona.com
Apache Lenya                              http://lenya.apache.org
gregor.rothfuss@wyona.com                       gregor@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org