Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 397
  • Last Modified:

Installing jakarta-tomcat-3.2.2-src

Dear all,


I have Linux Mandrake 7.2 running on my laptop.


I'm trying to install jakarta-tomcat-3.2.2.


I installed the jdk1.3.1 in the directory /usr/local/

ll /usr/local/jdk1.3.1/
total 5020
-r--r--r--    1 root     root         4003 May  6 12:41 COPYRIGHT
-r--r--r--    1 root     root        11480 May  6 12:41 LICENSE
-r--r--r--    1 root     root        13616 May  6 12:41 LICENSE.fr
-r--r--r--    1 root     root         3599 May  6 12:41 README
-r--r--r--    1 root     root        12024 May  6 12:41 README.html
drwxrwxr-x    3 root     root         4096 Jun 29 14:29 bin/
drwxrwxr-x    6 root     root         4096 May  6 12:41 demo/
drwxrwxr-x    3 root     root         4096 Jun 29 14:30 include/
drwxrwxr-x    3 root     root         4096 Jun 29 14:30 include-old/
drwxrwxr-x    5 root     root         4096 Jun 29 14:29 jre/
drwxrwxr-x    3 root     root         4096 Jun 29 14:29 lib/
drwxrwxr-x    4 root     root         4096 Jun 29 14:30 man/
-rw-rw-r--    1 root     root      5049576 May  6 12:41 src.jar


I can run he clock applet

http://localhost/usrlocal/jdk1.3.1/demo/applets/Clock/example1.html

in my Netscape browser, just fine.


I setup the /root/.bashrc file like this:

# .bashrc
# Chmouel Boudjnah <chmouel@mandrakesoft.com>
 
# User specific aliases and functions
 
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias d='ls'
alias s='cd ..'
alias p='cd -'
 
# Tell to df to don't see the supermount filesystems.
alias df='df -x supermount'
 
#
[ -z $DISPLAY ] || . /etc/profile.d/color_ls.sh
 
# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi
 
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
PATH=$PATH:/usr/local/j2sdkee1.3/bin
 
JAVA_HOME=/usr/local/jdk1.3.1
JAKARTA_HOME=/usr/local/jakarta-tomcat-3.2.2-src
PATH=$PATH:$JAVA_HOME/bin
 
CLASSPATH=$JAVA_HOME/src.jar:$JAKARTA_HOME/lib/jaxp.jar:$JAKARTA_HOME/lib/parser.jar
 
ENV=$HOME/.bashrc
USERNAME="root"
export USERNAME ENV PATH CLASSPATH
 
[ -z $INPUTRC ] && export INPUTRC=/etc/inputrc


I unpacked the /usr/local/jakarta-tomcat-3.2.2-src like this:

ll /usr/local/jakarta-tomcat-3.2.2-src

total 120
-rw-r--r--    1 1225     1225         1044 Mar 24  2000 BUGS
-rw-r--r--    1 1225     1225         1737 May 25 23:41 KEYS
-rw-r--r--    1 1225     1225         2811 Oct  9  1999 LICENSE
-rw-r--r--    1 1225     1225         6355 Dec 13  2000 README
-rw-r--r--    1 1225     1225         2189 Jan  6  2000 RELEASE-INFO
-rw-r--r--    1 1225     1225        18715 May 12 00:44 RELEASE-NOTES
-rw-r--r--    1 1225     1225         2288 Mar  2  2000 RELEASE-PLAN
-rw-r--r--    1 1225     1225         1924 Apr  7  2000 RELEASE-PLAN-3.2
-rw-r--r--    1 1225     1225         2301 Feb 25  2001 RELEASE-PLAN-3.2.2
-rw-r--r--    1 1225     1225        15927 Apr 13  2000 STATUS.html
-rw-r--r--    1 1225     1225         1749 Mar 24  2000 TODO
-rwxr-xr-x    1 1225     1225          996 Aug 24  2000 build.bat*
-rwxr-xr-x    1 1225     1225          585 May  1  2000 build.sh*
-rw-r--r--    1 1225     1225        11961 Feb 16  2001 build.xml
-rw-r--r--    1 1225     1225         7120 Mar  4  2000 build1.xml
-rwxr-xr-x    1 1225     1225          268 Oct  9  1999 generatedocs.bat*
-rw-r--r--    1 1225     1225          833 Jan 14  2000 generatedocs.sh
drwxr-xr-x    7 root     root         4096 Sep 14 11:46 jakarta-ant/
drwxr-xr-x   13 1225     1225         4096 May 29 04:03 src/


In it, I unpacked jakarta-ant like this:

ll /usr/local/jakarta-tomcat-3.2.2-src/jakarta-ant

total 212
drwxr-xr-x    3 root     root         4096 Feb  6  2001 Desktop/
-rw-r--r--    1 root     root        17773 Feb  6  2001 auto_inst.cfg.pl
-rw-r--r--    1 root     root       154679 Feb  6  2001 ddebug.log
-rw-r--r--    1 root     root        21335 Feb  6  2001 install.log
drwx------    2 root     root         4096 Feb 27  2001 nsmail/
drwx------    2 root     root         4096 Oct  9  2000 tmp/


The ./lib directory of the jakarta-ant shows these files:

ll /usr/local/jakarta-tomcat-3.2.2-src/jakarta-ant/lib

total 500
-rw-r--r--    1 root     root       330474 Oct 24  2000 ant.jar
-rw-r--r--    1 root     root        21660 Oct 24  2000 build.xml
-rw-r--r--    1 root     root         5618 Oct 24  2000 jaxp.jar
-rw-r--r--    1 root     root       136133 Oct 24  2000 parser.jar


I think I must run the command ./build.sh to build jakarta-tomcat-3.2.2.


When I run the command

/usr/local/jakarta-tomcat-3.2.2-src/build.sh

I get the message

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main


It looks like the main class of the jdk is not found by the build shell script.


But again, when, logged as a user (login:stephane), I try to compile an example applet shipped with the jdk, it compiles fine!

The command

javac Clock2.java

gives no error message, and creates a .class file that works fine from a browser.


Any idea of what I should do?


Thanks

Stephane/Stockholm

0
stephaneeybert
Asked:
stephaneeybert
  • 3
1 Solution
 
sdussingerCommented:
I believe you need ant.jar in your classpath...

--Steve
0
 
stephaneeybertAuthor Commented:
Okay,

I put the ant.jar file in the classpath. But I now get this message...


[root@localhost jakarta-tomcat-3.2.2-src]# ./build.sh
Searching for build.xml ...
Buildfile: /usr/local/jakarta-tomcat-3.2.2-src/build.xml
 
BUILD FAILED
 
No JAXP compliant XML parser found. See http://java.sun.com/xml for the
reference implementation.
java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:120)
        at org.apache.tools.ant.Main.runBuild(Main.java:401)
        at org.apache.tools.ant.Main.main(Main.java:149)
 
Total time: 2 seconds            
0
 
stephaneeybertAuthor Commented:
I'm going a bit further, but I'm still not there...

Here is my jakarta tomcat directory content. I put the jakarta ant in it, as well as the jakarta servlet.


[root@localhost jakarta-tomcat-3.2.2-src]# ll
total 132
-rw-r--r--    1 1225     1225         1044 Mar 24  2000 BUGS
-rw-r--r--    1 1225     1225         1737 May 25 23:41 KEYS
-rw-r--r--    1 1225     1225         2811 Oct  9  1999 LICENSE
-rw-r--r--    1 1225     1225         6355 Dec 13  2000 README
-rw-r--r--    1 1225     1225         2189 Jan  6  2000 RELEASE-INFO
-rw-r--r--    1 1225     1225        18715 May 12 00:44 RELEASE-NOTES
-rw-r--r--    1 1225     1225         2288 Mar  2  2000 RELEASE-PLAN
-rw-r--r--    1 1225     1225         1924 Apr  7  2000 RELEASE-PLAN-3.2
-rw-r--r--    1 1225     1225         2301 Feb 25  2001 RELEASE-PLAN-3.2.2
-rw-r--r--    1 1225     1225        15927 Apr 13  2000 STATUS.html
-rw-r--r--    1 1225     1225         1749 Mar 24  2000 TODO
drwxr-xr-x    3 root     root         4096 Sep 15 22:02 build/
-rwxr-xr-x    1 1225     1225          996 Aug 24  2000 build.bat*
-rwxr-xr-x    1 1225     1225          585 May  1  2000 build.sh*
-rw-r--r--    1 1225     1225        11961 Feb 16  2001 build.xml
-rw-r--r--    1 1225     1225         7120 Mar  4  2000 build1.xml
drwxr-xr-x    3 root     root         4096 Sep 15 22:02 dist/
-rwxr-xr-x    1 1225     1225          268 Oct  9  1999 generatedocs.bat*
-rw-r--r--    1 1225     1225          833 Jan 14  2000 generatedocs.sh
drwxr-xr-x    7 root     root         4096 Sep 15 22:16 jakarta-ant/
drwxr-xr-x    4 root     root         4096 Sep 15 22:04 jakarta-servletapi-3.2.3-src/
drwxr-xr-x   13 1225     1225         4096 May 29 04:03 src/


Here is my jakarta ant directory content.


[root@localhost jakarta-ant]# ll
total 40
-rw-r--r--    1 root     root         2754 Oct 24  2000 LICENSE
-rw-r--r--    1 root     root         2758 Oct 24  2000 README
-rw-r--r--    1 root     root          649 Oct 24  2000 TODO
-rw-r--r--    1 root     root         4238 Oct 24  2000 WHATSNEW
drwxr-xr-x    2 root     root         4096 Oct 24  2000 bin/
drwxr-xr-x    3 root     root         4096 Oct 24  2000 docs/
drwxr-xr-x    2 root     root         4096 Oct 24  2000 etc/
drwxr-xr-x    2 root     root         4096 Oct 24  2000 lib/
drwxr-xr-x    3 root     root         4096 Oct 24  2000 src/


Here is my jakarta servlet directory content.
Note that I compiled successfully the servlet package.

[root@localhost jakarta-servletapi-3.2.3-src]# ll
total 36
-rw-r--r--    1 root     root         2823 Apr 26  2000 LICENSE
-rw-r--r--    1 root     root         2009 Apr 27  2000 README
-rw-r--r--    1 root     root          572 Apr 27  2000 build.bat
-rwxr--r--    1 root     root          414 Apr 27  2000 build.sh*
-rw-r--r--    1 root     root         2963 Apr 28  2000 build.xml
-rw-r--r--    1 root     root         1301 Apr 28  2000 buildServletapi
-rw-r--r--    1 root     root         3566 Apr 28  2000 buildServletapi.xml
drwxr-xr-x    2 root     root         4096 Sep 15 13:51 lib/
drwxr-xr-x    3 root     root         4096 Sep 15 13:51 src/


Here is my CLASSPATH.

[root@localhost jakarta-tomcat-3.2.2-src]# echo $CLASSPATH
/usr/local/jdk1.3.1/src.jar:/usr/local/jakarta-tomcat-3.2.2-src/lib/jaxp.jar
:/usr/local/jakarta-tomcat-3.2.2-src/lib/parser.jar
:/usr/local/jakarta-tomcat-3.2.2-src/jakarta-ant/lib/ant.jar
:/usr/local/jaxp-1.1/jaxp.jar:/usr/local/jaxp-1.1/crimson.jar
:/usr/local/jaxp-1.1/xalan.jar
:/usr/local/jakarta-tomcat-3.2.2-src/jakarta-servletapi-3.2.3-src/lib/servlet.jar


When trying to build jakarta tomcat, I get the following message.

[root@localhost jakarta-tomcat-3.2.2-src]# ./build.sh
Searching for build.xml ...
Buildfile: /usr/local/jakarta-tomcat-3.2.2-src/build.xml
 
prepare:
 
BUILD FAILED
 
/usr/local/jakarta-tomcat-3.2.2-src/build.xml:32: /usr/local/jakarta-ant/bin not found.
 
Total time: 2 seconds



Any idea of what's missing..?
0
 
stephaneeybertAuthor Commented:
Now it works. Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now