tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "OOzy Pal" <oozy...@gmail.com>
Subject Re: Where is my Tomcat
Date Wed, 26 Jul 2006 14:39:29 GMT
On 7/26/06, Martin Gainty <mgainty@hotmail.com> wrote:
> Now that I see the exceptions from your log I can see you have some old and or corrupted
version sitting in the Tomcat work folder so I would..
>
> stop Tomcat
> <net stop Tomcat5/sh shutdown.sh>
>
> delete ALL of the stuff from the Tomcat work folder
> <del/rm>  %TOMCAT_HOME%/work/*.*
> make sure the folder is clean
> start Tomcat
> <net start Tomcat5/sh startup.sh>
>
> Martin --
> *********************************************************************
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
>
>
> ----- Original Message -----
> From: "OOzy Pal" <oozypal@gmail.com>
> To: "Tomcat Users List" <users@tomcat.apache.org>
> Sent: Wednesday, July 26, 2006 9:57 AM
> Subject: Re: Where is my Tomcat
>
>
> > On 7/25/06, David Smith <dns4@cornell.edu> wrote:
> >>
> >>
> >> OOzy Pal wrote:
> >>
> >> > On 7/25/06, Martin Gainty <mgainty@hotmail.com> wrote:
> >> >
> >> >> All Tomcat installations come with startup.<sh/bat> and
> >> >> shutdown.<sh/bat> located in $TOMCAT_HOME/bin
> >> >> run the startup.<sh/bat> first in some sort of console (xterm...)
and
> >> >> note the errors
> >> >> e.g. If it cant find $JAVA_HOME it will output debug messages to
> >> >> screem saying so
> >> >>
> >> >> When and only when your install has been running reliably well for
> >> >> some time
> >> >> place startup script in init.d
> >> >> M-
> >> >> *********************************************************************
> >> >> This email message and any files transmitted with it contain
> >> >> confidential
> >> >> information intended only for the person(s) to whom this email
> >> >> message is
> >> >> addressed.  If you have received this email message in error, please
> >> >> notify
> >> >> the sender immediately by telephone or email and destroy the original
> >> >> message without making a copy.  Thank you.
> >> >>
> >> >>
> >> >>
> >> >> ----- Original Message -----
> >> >> From: "OOzy Pal" <oozypal@gmail.com>
> >> >> To: "Tomcat Users List" <users@tomcat.apache.org>
> >> >> Sent: Tuesday, July 25, 2006 9:58 AM
> >> >> Subject: Re: Where is my Tomcat
> >> >>
> >> >>
> >> >> > On 7/25/06, Martin Millnert <millnert@csbnet.se> wrote:
> >> >> >> On Mon, 2006-07-24 at 23:02 +0200, edward wrote:
> >> >> >> > OOzy Pal wrote:
> >> >> >> >
> >> >> >> > >>
> >> >> >> > >>
> >> >> >> > >
> >> >> >> > > I found the JKD but I am not sure how start tomcat.
I am
> >> >> really stuck.
> >> >> >> > > I am not sure what am I missing? Is there a good
tutorial for
> >> >> >> > > installing tomcat?
> >> >> >> > >
> >> >> >> > > Any help is appreciated.
> >> >> >> >
> >> >> >> <snip>
> >> >> >> > Chances are that the Debian tomcat init scripts point
to gcj not
> >> >> to the
> >> >> >> > Sun jdk. It's OK, you can fix that. Try javac -version,
it will
> >> >> tell you
> >> >> >> > about the compiler (which is part of the jdk, not the
jre).
> >> >> Probably
> >> >> >> > you will find that /usr/bin/java and about half a dozen
other
> >> >> >> > /usr/bin/javax commands including javac and javah are
symlinks
> >> >> to the
> >> >> >> > gcj versions of java somewhere in /usr/lib. So what you
need to
> >> >> do is to
> >> >> >> > change those symlinks to point to the Sun ones, probably
in
> >> >> >> > /usr/share/lib. Some distros have a command which lets
you
> >> >> change the
> >> >> >> > system's version of java (Gentoo does, I'm not sure about
Debian)
> >> >> >> > without manually editing all the symlinks.
> >> >> >> >
> >> >> >> <snip>
> >> >> >>
> >> >> >> For reference, on a Ubuntu dapper desktop machine, here's
how to
> >> >> manage
> >> >> >> the symlinks:
> >> >> >> root@desktop1:~# which java
> >> >> >> /usr/bin/java
> >> >> >> root@desktop1:~# ls -al /usr/bin/java*
> >> >> >> lrwxrwxrwx 1 root root 22 2006-02-02 15:29 /usr/bin/java
> >> >> >> -> /etc/alternatives/java
> >> >> >> lrwxrwxrwx 1 root root 23 2006-03-02 14:25 /usr/bin/javac
> >> >> >> -> /etc/alternatives/javac
> >> >> >> lrwxrwxrwx 1 root root 25 2006-03-02 14:25 /usr/bin/javadoc
> >> >> >> -> /etc/alternatives/javadoc
> >> >> >> lrwxrwxrwx 1 root root 23 2006-03-02 14:25 /usr/bin/javah
> >> >> >> -> /etc/alternatives/javah
> >> >> >> lrwxrwxrwx 1 root root 23 2006-03-02 14:25 /usr/bin/javap
> >> >> >> -> /etc/alternatives/javap
> >> >> >> lrwxrwxrwx 1 root root 24 2006-03-02 14:26 /usr/bin/javaws
> >> >> >> -> /etc/alternatives/javaws
> >> >> >>
> >> >> >> These commands does not have to be run as root, Ubuntu favours
not
> >> >> using
> >> >> >> the root account but sudo instead -- which is how OOzy was
working.
> >> >> >> The above shows and proves that the Ubuntu-style method is
in fact in
> >> >> >> use, and unorthodox methods has not been introduced to the
> >> >> packages. ;)
> >> >> >> There are clear advantages of managing the JDKs as real packages,
and
> >> >> >> there is plenty of reference on this online:
> >> >> >>
> >> >> http://www.google.se/search?hl=sv&q=the+correct+way+to+install+sun+java
> >> >> >> +jdk+on+ubuntu&btnG=S%C3%B6k&meta=
> >> >> >>
> >> >> >> Ubuntu (as well as Debian) ships with the update-alternatives
> >> >> program,
> >> >> >> which manages the symlinks and it is necessary to redirect
these
> >> >> if you
> >> >> >> have installed and are planning on using the Sun JDK.
> >> >> >>
> >> >> >> Example:
> >> >> >>
> >> >> >> root@desktop1:~# update-alternatives --config java
> >> >> >>
> >> >> >> There are 5 alternatives which provide `java'.
> >> >> >>
> >> >> >>   Selection    Alternative
> >> >> >> -----------------------------------------------
> >> >> >>       1        /usr/lib/j2sdk1.5-sun/bin/java
> >> >> >> *     2        /usr/lib/j2sdk1.4-sun/bin/java
> >> >> >>       3        /usr/bin/gij-wrapper-4.1
> >> >> >>       4        /usr/bin/gij-wrapper-4.0
> >> >> >>  +    5        /usr/lib/jvm/java-gcj/jre/bin/java
> >> >> >>
> >> >> >> Press enter to keep the default[*], or type selection number:
> >> >> >>
> >> >> >>
> >> >> >> Note that this only configures the `which java`-program. You
should
> >> >> >> point all programs to the same version. At the very least
make sure
> >> >> >> "java" and "javac" are pointing to the same JDK to avoid confusion.
> >> >> >> To point all programs in a one-liner, you could use:
> >> >> >> root@desktop1:~# cd /usr/bin && for PROGRAM in `ls
java*`; do
> >> >> >> update-alternatives --config $PROGRAM ; done
> >> >> >>
> >> >> >> If you're using the sudo administration method, modify the
line
> >> >> >> accordingly:
> >> >> >> root@desktop1:~# cd /usr/bin && for PROGRAM in `ls
java*`; do sudo
> >> >> >> update-alternatives --config $PROGRAM ; done
> >> >> >>
> >> >> >> This requires you to possibly write in the password as many
times as
> >> >> >> there are PROGRAMs, unless your system cache your sudo credentials.
> >> >> >> A more complicated method to achieve the same result is:
> >> >> >> sudo bash -c 'cd /usr/bin && for PROGRAM in `ls java*`;
do
> >> >> >> update-alternatives --config $PROGRAM ; done'
> >> >> >>
> >> >> >>
> >> >> >> HTH,
> >> >> >> Regards
> >> >> >> --
> >> >> >> Martin Millnert <millnert@csbnet.se>
> >> >> >>
> >> >> >>
> >> >> >> -----BEGIN PGP SIGNATURE-----
> >> >> >> Version: GnuPG v1.4.3 (GNU/Linux)
> >> >> >>
> >> >> >> iD8DBQBExdyjApq14zkeZkwRAqHaAJ4z9Y9kniiIZdqMtEdZrZP37cFgcQCfactI
> >> >> >> SU3qpmEIh5uxUowdGjbBn/Q=
> >> >> >> =eQ5x
> >> >> >> -----END PGP SIGNATURE-----
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> > I am really lost. How about starting over? I will remove everything
> >> >> > and start from scratch. I just want some good tutorial on how
to
> >> >> > install everything again.
> >> >> >
> >> >> > Anyhow is some info of the my current system:
> >> >> >
> >> >> > $java -version
> >> >> > java version "1.4.2"
> >> >> > gij (GNU libgcj) version 4.1.0 (Ubuntu 4.1.0-1ubuntu8)
> >> >> >
> >> >> > Copyright (C) 2006 Free Software Foundation, Inc.
> >> >> > This is free software; see the source for copying conditions.
> >> >> There is NO
> >> >> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> >> >> PURPOSE.
> >> >> > -------------------------
> >> >> >
> >> >> > $javac -version
> >> >> > Eclipse Java Compiler v_585_R31x, 3.1.2 release, Copyright IBM
Corp
> >> >> > 2000, 2006. All rights reserved.
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > OOzy
> >> >> > Kubuntu-Dapper
> >> >> >
> >> >> > ---------------------------------------------------------------------
> >> >> > To start a new topic, e-mail: users@tomcat.apache.org
> >> >> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> >> > For additional commands, e-mail: users-help@tomcat.apache.org
> >> >> >
> >> >> >
> >> >
> >> > Martin,
> >> >
> >> >
> >> > $ echo $JAVA_HOME
> >> > /usr/lib/jvm/java-1.5.0-sun/
> >> >
> >> > $ sudo /usr/share/tomcat5/bin/startup.sh
> >> >
> >> > Using CATALINA_BASE:   /usr/share/tomcat5
> >> > Using CATALINA_HOME:   /usr/share/tomcat5
> >> > Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
> >> > Using JAVA_HOME:       /usr/lib/jvm/java-1.5.0-sun/
> >> >
> >> > $ /etc/init.d/tomcat5 start
> >> > Starting Tomcat 5 servlet engine using Java from /usr/lib/j2se/1.4:
> >> >
> >> > with the following catalina_out log
> >> > The JAVA_HOME environment variable is not defined correctly
> >> > This environment variable is needed to run this program
> >> > NB: JAVA_HOME should point to a JDK not a JRE
> >> >
> >> > I get the above error even though JAVA_HOME points to the JDK but
> >> > tomcat insists on using /usr/lib/j2se/1.4 not
> >> > /usr/lib/jvm/java-1.5.0-sun/
> >> >
> >> > any help Martin?
> >> >
> >>
> >> Take a look at the shell script used to start the service
> >> (/etc/init.d/tomcat5) and see how it determines the JDK.  Is it honoring
> >> the JAVA_HOME environment variable or digging around on it's own for
> >> something else?
> >>
> >> --David
> >>
> >> ---------------------------------------------------------------------
> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> > David,
> >
> > THAAANK YOU so much. Finally, tomcat5 is working.
> >
> > I added "echo $JAVA_HOME" to init.d/tomcat5 script to make sure that
> > the script is honoring  my $JAVA_HOME and you are right, It was
> > digging for its own.
> >
> > Then I added:
> > JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun/" to the script and BANG it worked.
> >
> > Now when I do "http://localhost:8180/" I get an HTTP Status 500 - error
> >
> > -----ERROR--------
> > type Exception report
> >
> > message
> >
> > description The server encountered an internal error () that prevented
> > it from fulfilling this request.
> >
> > exception
> >
> > org.apache.jasper.JasperException: Unable to compile class for JSP
> > org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:520)
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > java.lang.reflect.Method.invoke(Method.java:585)
> > org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
> > java.security.AccessController.doPrivileged(Native Method)
> > javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
> > org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
> > org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
> >
> > root cause
> >
> > java.io.FileNotFoundException:
> > /var/lib/tomcat5/work/Catalina/localhost/_/org/apache/jsp/index_jsp.java
> > (No such file or directory)
> > java.io.FileOutputStream.open(Native Method)
> > java.io.FileOutputStream.<init>(FileOutputStream.java:179)
> > java.io.FileOutputStream.<init>(FileOutputStream.java:70)
> > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:188)
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
> > org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > java.lang.reflect.Method.invoke(Method.java:585)
> > org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
> > java.security.AccessController.doPrivileged(Native Method)
> > javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
> > org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
> > org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
> >
> > note The full stack trace of the root cause is available in the Apache
> > Tomcat/5.0 logs.
> >
> > --
> > OOzy
> > Kubuntu-Dapper
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >

 I am jumping up and down. I could see my cute cat now.

Thank you.

-- 
OOzy
Kubuntu-Dapper

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


Mime
View raw message