tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albretch Mueller <lbrt...@gmail.com>
Subject Re: BUILD FAILED: Cause: the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found ...
Date Fri, 08 Feb 2013 21:23:41 GMT
> Maybe try to download a fresh copy of Ant and compare it with your installation?

 thank you, that did it:

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

$ date; _DT=$(date +%Y%m%d%H%M%S); ant test -logfile
ant_test_apache-tomcat-7.0.35-src_${_DT}.log 2>&1; date
Fri Feb  8 14:27:09 UTC 2013
Buildfile: /media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/build.xml
Fri Feb  8 14:50:03 UTC 2013

$ tail -n 10 ant_test_apache-tomcat-7.0.35-src_${_DT}.log
    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 2.451 sec

test-apr-exists:

test-apr:

test:

BUILD SUCCESSFUL
Total time: 22 minutes 53 seconds

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

 then I got:

 "Error: Could not find or load main class
org.apache.catalina.startup.Bootstrap"

 and after looking a little deeper into the running context

$ ./startup.sh
Using CATALINA_BASE:
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src
Using CATALINA_HOME:
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src
Using CATALINA_TMPDIR:
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/temp
Using JRE_HOME:        /media/sdb1/inst/sw/jdk/x86/jdk1.7.0_11
Using CLASSPATH:
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/bin/bootstrap.jar:/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/bin/tomcat-juli.jar

 and noticing "bootstrap.jar" was not where tc was looking for it
(SOMETHING I THINK SHOULD HAVE BEEN CHECKED AND STATED EXPLICITLY AS
PART OF THE ERROR MESSAGE OF THE LOG FILE)

$ cat /media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/logs/catalina.out
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/catalina/startup/Bootstrap
Caused by: java.lang.ClassNotFoundException:
org.apache.catalina.startup.Bootstrap
	at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.apache.catalina.startup.Bootstrap.
Program will exit.
Error: Could not find or load main class org.apache.catalina.startup.Bootstrap
Error: Could not find or load main class org.apache.catalina.startup.Bootstrap
Error: Could not find or load main class org.apache.catalina.startup.Bootstrap
Error: Could not find or load main class org.apache.catalina.startup.Bootstrap

$ ls -l /media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/bin/bootstrap.jar
ls: cannot access
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/bin/bootstrap.jar:
No such file or directory

 I looked for it

 find /media/sdb1 -type f -iname "bootstrap.jar"

 and found it in the output dir created by the build:

 /media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build/bin/bootstrap.jar

 so I opened a new terminal tab and reset the whole context

$ pwd
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build

$ export JAVA_HOME=/media/sdb1/inst/sw/jdk/x86/jdk1.7.0_11
$ export PATH=$JAVA_HOME/bin:$PATH
$ export ANT_HOME=/media/sdb1/inst/sw/apache-ant-1.8.4
$ export TOMCAT_HOME=/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build
$ export CATALINA_HOME=/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build

$ cd bin

$ pwd
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build/bin

$ ls -l *.sh
-rwxr-xr-x 1 knoppix knoppix 19189 Feb  8 11:55 catalina.sh
-rwxr-xr-x 1 knoppix knoppix  1982 Feb  8 11:55 configtest.sh
-rwxr-xr-x 1 knoppix knoppix  7492 Feb  8 11:55 daemon.sh
-rwxr-xr-x 1 knoppix knoppix  2021 Feb  8 11:55 digest.sh
-rwxr-xr-x 1 knoppix knoppix  3524 Feb  8 11:55 setclasspath.sh
-rwxr-xr-x 1 knoppix knoppix  1960 Feb  8 11:55 shutdown.sh
-rwxr-xr-x 1 knoppix knoppix  1961 Feb  8 11:55 startup.sh
-rwxr-xr-x 1 knoppix knoppix  5086 Feb  8 11:55 tool-wrapper.sh
-rwxr-xr-x 1 knoppix knoppix  1965 Feb  8 11:55 version.sh

$ ./catalina.sh start
Using CATALINA_BASE:
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build
Using CATALINA_HOME:
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build
Using CATALINA_TMPDIR:
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build/temp
Using JRE_HOME:        /media/sdb1/inst/sw/jdk/x86/jdk1.7.0_11
Using CLASSPATH:
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build/bin/bootstrap.jar:/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build/bin/tomcat-juli.jar

$ cat /media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build/logs/catalina.out
Feb 08, 2013 4:03:54 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
Feb 08, 2013 4:03:55 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Feb 08, 2013 4:03:55 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Feb 08, 2013 4:03:55 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1689 ms
Feb 08, 2013 4:03:55 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 08, 2013 4:03:55 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.35
Feb 08, 2013 4:03:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build/webapps/examples
Feb 08, 2013 4:03:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build/webapps/host-manager
Feb 08, 2013 4:03:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build/webapps/ROOT
Feb 08, 2013 4:03:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build/webapps/docs
Feb 08, 2013 4:03:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
/media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/output/build/webapps/manager
Feb 08, 2013 4:03:56 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Feb 08, 2013 4:03:56 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Feb 08, 2013 4:03:56 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1317 ms

$ netstat -na --tcp | grep 8080
tcp6       0      0 :::8080                 :::*                    LISTEN

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


Mime
View raw message