You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Volkov, Maxim" <M....@telesens.com.ua> on 2000/04/17 12:57:02 UTC

RE: Exception in thread "main" java.lang.NoClassDefFoundError: or g/apache/tomcat/sta

Looks like you are using old Tomcat (3.0), according to your classpath.
The problem might be that startup/tomcat is provided for new Tomcat 3.1 and
its webserver.jar is located at different path.
Check your paths
Good luck!
 

Sincerely Yours, 
Maksym Volkov, 

Technical Writer, 
Telesens Ukraine Ltd. 
phone: +(380 572)190-567 (205) 
e-mail: M.Volkov@telesens.com.ua 
www.telesens.com.ua 
Ideas expressed in this message are my own and not necessarily reflect that
of my employer. 

-----Original Message-----
From: Franky Mas de Xaxas [mailto:fmasf@nexo.es]
Sent: Monday, April 17, 2000 12:56
To: tomcat-user@jakarta.apache.org
Subject: Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/tomcat/sta



Hi,
 
Im triying to run Tomcat on Windows 95 but I get one error:
 
It seems I don't have the class named org/apache/tomcat/startup/Tomcat,
since I get the error listed below when I try to execute the comand 'tomcat
run'

C:\APPS\jakarta-tomcat\bin>tomcat run
Using classpath:
C:\APPS\JAKART~1\BIN\classes;C:\APPS\JAKART~1\BIN\lib\webserver
.jar;C:\APPS\JAKART~1\BIN\lib\jasper.jar;C:\APPS\JAKART~1\BIN\lib\xml.jar;C:
\APP
S\JAKART~1\BIN\lib\servlet.jar;C:\jdk1.2.2\lib\tools.jar;C:\APPS\JAKART~1\BI
N\cl
asses;C:\APPS\JAKART~1\BIN\lib\webserver.jar;C:\APPS\JAKART~1\BIN\lib\jasper
.jar
;C:\APPS\JAKART~1\BIN\lib\xml.jar;C:\APPS\JAKART~1\BIN\lib\servlet.jar;C:\jd
k1.2
.2\lib\tools.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/tomcat/sta
rtup/Tomcat


Maybe I should try to work with the file tomcat.properties?
 
Any one could help?
 
Thanks for advanced!
 
----------------
Franky:  fmasf@nexo.es <ma...@nexo.es> 


Thanks and more

Posted by Franky Mas de Xaxás <fm...@nexo.es>.
Thank you very much Maksym and Marcus,

you both were right. I had some problems with my paths.

Now I got Tomcat running with Apache on Windows 95. 

I'm really new on this technogy, so excuse me if I abuse from your time. What I want to do is run Java Server Pages with Apache, and later on get in touch with servlets, JavaBeans, XML and so on.

But, I still don't have Tomcat rigt working with Apache, because whenever I try to execute a JavaServerPage, I get the message "Page not found" so:

COULD YOU SEND ME A LITTLE EXAMPLE THAT SHOWS HOW TO RUN A JAVASERVERPAGE WITH TOMCAT 3.1 AND APACHE 1.3.9?
WHERE DO I HAVE TO STORAGE THE .JSP PAGES?

Thank you very much for advanced.

PS: I have good experience working with Oracle 8 and designing data models for datawarehousing, so if you need any help I'll be glad to colaborate with you.

Regards,

Franky
  ----- Original Message ----- 
  From: Marcus Conti 
  To: tomcat-user@jakarta.apache.org 
  Sent: Monday, April 17, 2000 10:58 PM
  Subject: Re: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/sta


  Franky, 
  i got the same error (also on Windows 9X), in my case it was because i had not set the environment variables TOMCAT_HOME and JAVA_HOME.  either set them in your autoexec.bat or in the tomcat.bat that comes with Tomcat 3.1. 
  e.g. in tomcat.bat add the following lines after "set cp=%CLASSPATH%" 
  set TOMCAT_HOME=c:\jakarta-tomcat 
  set JAVA_HOME=c:\java\jdk 
  replace c:\jakarta-tomcat with directory you installed tomcat to and replace c:\java\jdk with directory where your java jdk is installed.  point both variables to the directory that conatins the "lib" directory not to the lib directory itself. 
  hope this solves the problem. 
  Marcus 

  -- 
  Marcus Conti, MCP 
  Internet Application Developer 
  -Loki Technologies- 
  "Internet Solutions for Attorneys" 
  Email: mconti@lokitech.com 
  Office: (301)656-5503 
  Web: http://www.lokitech.com 
    

  Franky Mas de Xaxás wrote: 

    Hi Maksym, thank you very much for your quick response. Frome your email I realize that the mising class should be inside webserver.jar.I think I'm using Tomcat (3.1) since I downloaded from http://jakarta.apache.org/builds/tomcat/release/v3.1_beta_1/bin/jakarta_tomcat.zip Do you know why the class org/apache/tomcat/startup/Tomcat doesn't appear in webserver.jar. Thank you again. Franky:  fmasf@nexo.es 
      ----- Original Message -----
      From: Volkov, Maxim
      To: 'tomcat-user@jakarta.apache.org'
      Sent: Monday, April 17, 2000 12:57 PM
      Subject: RE: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/sta
       Looks like you are using old Tomcat (3.0), according to your classpath.The problem might be that startup/tomcat is provided for new Tomcat 3.1 and its webserver.jar is located at different path.Check your pathsGood luck! Sincerely Yours, 
      Maksym Volkov, 
      Technical Writer, 
      Telesens Ukraine Ltd. 
      phone: +(380 572)190-567 (205) 
      e-mail: M.Volkov@telesens.com.ua 
      www.telesens.com.ua 
      Ideas expressed in this message are my own and not necessarily reflect that of my employer. 

        -----Original Message----- 
        From: Franky Mas de Xaxas [mailto:fmasf@nexo.es] 
        Sent: Monday, April 17, 2000 12:56 
        To: tomcat-user@jakarta.apache.org 
        Subject: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/sta 
         
          
        Hi, Im triying to run Tomcat on Windows 95 but I get one error: It seems I don't have the class named org/apache/tomcat/startup/Tomcat, since I get the error listed below when I try to execute the comand 'tomcat run' 
          C:\APPS\jakarta-tomcat\bin>tomcat run 
          Using classpath: C:\APPS\JAKART~1\BIN\classes;C:\APPS\JAKART~1\BIN\lib\webserver 
          .jar;C:\APPS\JAKART~1\BIN\lib\jasper.jar;C:\APPS\JAKART~1\BIN\lib\xml.jar;C:\APP 
          S\JAKART~1\BIN\lib\servlet.jar;C:\jdk1.2.2\lib\tools.jar;C:\APPS\JAKART~1\BIN\cl 
          asses;C:\APPS\JAKART~1\BIN\lib\webserver.jar;C:\APPS\JAKART~1\BIN\lib\jasper.jar 
          ;C:\APPS\JAKART~1\BIN\lib\xml.jar;C:\APPS\JAKART~1\BIN\lib\servlet.jar;C:\jdk1.2 
          .2\lib\tools.jar 
          Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/sta 
          rtup/Tomcat
        Maybe I should try to work with the file tomcat.properties? Any one could help? Thanks for advanced! ----------------Franky:  fmasf@nexo.es

    
    

Re: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/sta

Posted by Marcus Conti <mc...@lokitech.com>.
Franky,
i got the same error (also on Windows 9X), in my case it was because i
had not set the environment variables TOMCAT_HOME and JAVA_HOME.  either
set them in your autoexec.bat or in the tomcat.bat that comes with
Tomcat 3.1.
e.g. in tomcat.bat add the following lines after "set cp=%CLASSPATH%"
set TOMCAT_HOME=c:\jakarta-tomcat
set JAVA_HOME=c:\java\jdk

replace c:\jakarta-tomcat with directory you installed tomcat to and
replace c:\java\jdk with directory where your java jdk is installed.
point both variables to the directory that conatins the "lib" directory
not to the lib directory itself.
hope this solves the problem.
Marcus

--
Marcus Conti, MCP
Internet Application Developer
-Loki Technologies-
"Internet Solutions for Attorneys"
Email: mconti@lokitech.com
Office: (301)656-5503
Web: http://www.lokitech.com


Franky Mas de Xaxás wrote:

> Hi Maksym, thank you very much for your quick response. Frome your
> email I realize that the mising class should be inside webserver.jar.I
> think I'm using Tomcat (3.1) since I downloaded from
> http://jakarta.apache.org/builds/tomcat/release/v3.1_beta_1/bin/jakarta_tomcat.zip Do
> you know why the class org/apache/tomcat/startup/Tomcat doesn't appear
> in webserver.jar. Thank you again. Franky:  fmasf@nexo.es
>
>      ----- Original Message -----
>      From: Volkov, Maxim
>      To: 'tomcat-user@jakarta.apache.org'
>      Sent: Monday, April 17, 2000 12:57 PM
>      Subject: RE: Exception in thread "main"
>      java.lang.NoClassDefFoundError: org/apache/tomcat/sta
>       Looks like you are using old Tomcat (3.0), according to
>      your classpath.The problem might be that startup/tomcat is
>      provided for new Tomcat 3.1 and its webserver.jar is located
>      at different path.Check your pathsGood luck! Sincerely
>      Yours,
>      Maksym Volkov,
>
>      Technical Writer,
>      Telesens Ukraine Ltd.
>      phone: +(380 572)190-567 (205)
>      e-mail: M.Volkov@telesens.com.ua
>      www.telesens.com.ua
>      Ideas expressed in this message are my own and not
>      necessarily reflect that of my employer.
>
>           -----Original Message-----
>           From: Franky Mas de Xaxas [mailto:fmasf@nexo.es]
>           Sent: Monday, April 17, 2000 12:56
>           To: tomcat-user@jakarta.apache.org
>           Subject: Exception in thread "main"
>           java.lang.NoClassDefFoundError:
>           org/apache/tomcat/sta
>
>
>           Hi, Im triying to run Tomcat on Windows 95 but I
>           get one error: It seems I don't have the class
>           named org/apache/tomcat/startup/Tomcat, since I
>           get the error listed below when I try to execute
>           the comand 'tomcat run'
>
>                C:\APPS\jakarta-tomcat\bin>tomcat run
>                Using classpath:
>                C:\APPS\JAKART~1\BIN\classes;C:\APPS\JAKART~1\BIN\lib\webserver
>
>                .jar;C:\APPS\JAKART~1\BIN\lib\jasper.jar;C:\APPS\JAKART~1\BIN\lib\xml.jar;C:\APP
>
>                S\JAKART~1\BIN\lib\servlet.jar;C:\jdk1.2.2\lib\tools.jar;C:\APPS\JAKART~1\BIN\cl
>
>                asses;C:\APPS\JAKART~1\BIN\lib\webserver.jar;C:\APPS\JAKART~1\BIN\lib\jasper.jar
>
>                ;C:\APPS\JAKART~1\BIN\lib\xml.jar;C:\APPS\JAKART~1\BIN\lib\servlet.jar;C:\jdk1.2
>
>                .2\lib\tools.jar
>                Exception in thread "main"
>                java.lang.NoClassDefFoundError:
>                org/apache/tomcat/sta
>                rtup/Tomcat
>
>           Maybe I should try to work with the file
>           tomcat.properties? Any one could help? Thanks for
>           advanced! ----------------Franky:  fmasf@nexo.es
>




Re: Possible Enhancement

Posted by Guillaume Rousse <Gu...@univ-reunion.fr>.
Le mar, 18 avr 2000, vous avez �crit :
> 
> I can think of a few possible enhancements for the tomcat product, and would like to bounce the ideas off everyone...
> 
> 1) Make it so you can run tomcat as a user rather than the user that starts the process. Apache you can tell to run as user blah and group blah, I can't believe that this isn't implemented in tomcat.
> 
> 2) It would be nice to be able to do directives in the server.xml file so that when you set up a context, you could also set up logging for all the stuff that tomcat does with regards to that context. Basically, splitting out logs similar to the way that vhosts can be set up in apache to each have their own error and access logs.
> 
> The next question I have is about the apache-tomcat.conf file. When exactly is that read and by what process. I would think that it's being read by apache when apache starts up, but the only thing that I have in my httpd.conf is a reference to include the tomcat.conf file which doesn't reference anywhere the tomcat-apache.conf file that I can find. Can anyone explain where that's at. I'd like to take that information and put it into the vhosts definitions for my virtual hosts if possible. Any thoughts on this?
apache-tomcat.conf is automatically generated by tomcat every time it starts,
from server.xml content : it's content is dynamic. tomcat.conf is the static
version. So you can use one of the other. For my part, i'm still looking what
template use tomcat for building tomcat-apache.conf, as i would like to use
it with some minor changes (like the directory to my mod_jserv module, for
example).


> Craig, your email helped a little, and I figured I'd toss some ideas out here. Thanks in advance for any help.
> 
> -jeff hoffman
> headland digital media : webmaster
> 513 755 0086
----------------------------------------

-- 
Guillaume Rousse
Iremia - Universit� de la R�union

Sleep doesn't exists. Just lack of cafeine.

What does this error mean?

Posted by Charles Luo <ch...@allsofts.com>.
hi, guys,

I have installed Apache-1.3.9 + Tomcat-3.0 on RH6.0 Linux.

When running JSP / Servlet examples provided by Tomcat distribution, I got
the following error message from error_log.log of Apache:

child pid 927 exit signal Segmentation fault (11)

What kind of error could cause this error to be happened? And what I should
do?

Any suggestion would be appreciated. Thank you in advance.

cheers,
charles

----------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org


Re: Does anyone know about Java packages?

Posted by "grobe.org" <ga...@grobe.org>.
the package tree is mirrored under WEB-INF/classes

so, in the top of your file, you may have:
package myPackA.myPackB.ThisPackage;

then, the path under tomcat may look like:

/usr/local/tomcat/webapps/myApp/WEB-INF/classes/myPackA/myPackB/ThisPackage

btw - take a look at Ant (on the jakarta.apache.org site) it'll place all
this for you.

----- Original Message -----
From: "jeff hoffman" <je...@headland-media.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, April 18, 2000 4:41 AM
Subject: Does anyone know about Java packages?


> Does anyone know how to implement java packages under tomcat? My
developers
> are crying about it and I haven't seen anything in the documentation.
> (though I have a long plane ride tomorrow to SF to read the 2.2 spec a lot
> more closely on...)
>
> Thanks in advance.
> -jeff hoffman
>
>
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
>


Does anyone know about Java packages?

Posted by jeff hoffman <je...@headland-media.com>.
Does anyone know how to implement java packages under tomcat? My developers
are crying about it and I haven't seen anything in the documentation.
(though I have a long plane ride tomorrow to SF to read the 2.2 spec a lot
more closely on...)

Thanks in advance.
-jeff hoffman



Re: Possible Enhancement

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.

Jeff Hoffman wrote:

> I can think of a few possible enhancements for the tomcat product, and
> would like to bounce the ideas off everyone... 1) Make it so you can
> run tomcat as a user rather than the user that starts the process.
> Apache you can tell to run as user blah and group blah, I can't
> believe that this isn't implemented in tomcat. 2) It would be nice to
> be able to do directives in the server.xml file so that when you set
> up a context, you could also set up logging for all the stuff that
> tomcat does with regards to that context. Basically, splitting out
> logs similar to the way that vhosts can be set up in apache to each
> have their own error and access logs. The next question I have is
> about the apache-tomcat.conf file. When exactly is that read and by
> what process. I would think that it's being read by apache when apache
> starts up, but the only thing that I have in my httpd.conf is a
> reference to include the tomcat.conf file which doesn't reference
> anywhere the tomcat-apache.conf file that I can find. Can anyone
> explain where that's at. I'd like to take that information and put it
> into the vhosts definitions for my virtual hosts if possible. Any
> thoughts on this? Craig, your email helped a little, and I figured I'd
> toss some ideas out here. Thanks in advance for any help.
> -jeff hoffman
> headland digital media : webmaster
> 513 755 0086

(1) Apache can only do this if you start it as root.  If you have root
access, it's trivially easy -- just make a root-executable script that
does an "su" command to the correct username.

    su - myusername -c "cd $TOMCAT_HOME ; ./bin/startup.sh"

(2) The current architecture of Tomcat is not really set up for this --
it's a good idea.  It's also useful to be able to log at the virtual
host level (i.e. all the web apps that belong to a particular virtual
host) as well.  Both of these are already designed in to the Catalina
architecture proposal I'm working on, to be ready in time for Tomcat
4.x.  For further information, download a source distribution of Tomcat
(or get it via anonymous CVS access) and check out the
"proposals/catalina" subdirectory.

(3)  I primarily use Tomcat stand-alone, so pretty much all I know about
apache-tomcat.conf is what the user's guide has to say.  In particular,
the file "$TOMCAT_HOME/conf/tomcat-apache.conf" is generated each time
you start Tomcat, based on the server.xml configuration.  If you don't
need anything special, you can just include this file in your httpd.conf
-- otherwise, you can use this as a model for doing your own.  But it is
up to you to choose what to include in "httpd.conf" -- Tomcat does NOT
change "httpd.conf" for you.  The user's guide is in
"$TOMCAT_HOME/doc/uguide/tomcat_ug.html" in the release.

Craig





Possible Enhancement

Posted by Jeff Hoffman <je...@headland-media.com>.
I can think of a few possible enhancements for the tomcat product, and would like to bounce the ideas off everyone...

1) Make it so you can run tomcat as a user rather than the user that starts the process. Apache you can tell to run as user blah and group blah, I can't believe that this isn't implemented in tomcat.

2) It would be nice to be able to do directives in the server.xml file so that when you set up a context, you could also set up logging for all the stuff that tomcat does with regards to that context. Basically, splitting out logs similar to the way that vhosts can be set up in apache to each have their own error and access logs.

The next question I have is about the apache-tomcat.conf file. When exactly is that read and by what process. I would think that it's being read by apache when apache starts up, but the only thing that I have in my httpd.conf is a reference to include the tomcat.conf file which doesn't reference anywhere the tomcat-apache.conf file that I can find. Can anyone explain where that's at. I'd like to take that information and put it into the vhosts definitions for my virtual hosts if possible. Any thoughts on this?

Craig, your email helped a little, and I figured I'd toss some ideas out here. Thanks in advance for any help.

-jeff hoffman
headland digital media : webmaster
513 755 0086

Re: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/sta

Posted by Franky Mas de Xaxás <fm...@nexo.es>.
Hi Maksym,

thank you very much for your quick response.

Frome your email I realize that the mising class should be inside webserver.jar.
I think I'm using Tomcat (3.1) since I downloaded from http://jakarta.apache.org/builds/tomcat/release/v3.1_beta_1/bin/jakarta_tomcat.zip

Do you know why the class org/apache/tomcat/startup/Tomcat doesn't appear in webserver.jar.

Thank you again.

Franky:  fmasf@nexo.es


  ----- Original Message ----- 
  From: Volkov, Maxim 
  To: 'tomcat-user@jakarta.apache.org' 
  Sent: Monday, April 17, 2000 12:57 PM
  Subject: RE: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/sta


  Looks like you are using old Tomcat (3.0), according to your classpath.
  The problem might be that startup/tomcat is provided for new Tomcat 3.1 and its webserver.jar is located at different path.
  Check your paths
  Good luck!

  Sincerely Yours, 
  Maksym Volkov, 

  Technical Writer, 
  Telesens Ukraine Ltd. 
  phone: +(380 572)190-567 (205) 
  e-mail: M.Volkov@telesens.com.ua 
  www.telesens.com.ua 
  Ideas expressed in this message are my own and not necessarily reflect that of my employer. 

    -----Original Message-----
    From: Franky Mas de Xaxas [mailto:fmasf@nexo.es]
    Sent: Monday, April 17, 2000 12:56
    To: tomcat-user@jakarta.apache.org
    Subject: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/sta



    Hi,

    Im triying to run Tomcat on Windows 95 but I get one error:

    It seems I don't have the class named org/apache/tomcat/startup/Tomcat, since I get the error listed below when I try to execute the comand 'tomcat run'
      C:\APPS\jakarta-tomcat\bin>tomcat run
      Using classpath: C:\APPS\JAKART~1\BIN\classes;C:\APPS\JAKART~1\BIN\lib\webserver
      .jar;C:\APPS\JAKART~1\BIN\lib\jasper.jar;C:\APPS\JAKART~1\BIN\lib\xml.jar;C:\APP
      S\JAKART~1\BIN\lib\servlet.jar;C:\jdk1.2.2\lib\tools.jar;C:\APPS\JAKART~1\BIN\cl
      asses;C:\APPS\JAKART~1\BIN\lib\webserver.jar;C:\APPS\JAKART~1\BIN\lib\jasper.jar
      ;C:\APPS\JAKART~1\BIN\lib\xml.jar;C:\APPS\JAKART~1\BIN\lib\servlet.jar;C:\jdk1.2
      .2\lib\tools.jar
      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/sta
      rtup/Tomcat

    Maybe I should try to work with the file tomcat.properties?
     
    Any one could help?
     
    Thanks for advanced!
     
    ----------------
    Franky:  fmasf@nexo.es