You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Flambard Jean Michel <jm...@club-internet.fr> on 2000/08/07 20:00:35 UTC

New user

hi all,

Fisrt, sorry for my bad english, I'm french.

I am new on this mailing list and so I am a new Tomcat user.
I am trying to compile and install my first web application
with tomcat.
I have a NoClassDefFoundError when I throw the 'build' file.

Below the complete message:
Buildfile: buil.xml
Project base dir set to: /home/flambard/Projets/InfoClient
Executing Target: prepare
Executing Target: compile
Compiling 1 source files to
/home/flambard/tomcat/webapps/InfoClient/WEB-INF/classes
Exception in thread "main" java.lan.NoClassDefFoundError:
sun/tools/javac/Main
        at
org.apache.tools.ant.taskdefs.Javac.doClassicCompile(Javac.java:418)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:218)
	at org.apache.tools.ant.Target.execute(Target.java, compiled Code)
	at org.apache.tools.ant.Project.runTarget(Project.java, Compiled Code)
	at org.apache.tools.ant.Project.executeTarget(Project.java:422)
	at org.apache.tools.ant.Main.runBuild(Main.java:240)
	at org.apache.tools.ant.Main.main(Main.java:191)

My configuration:
	linux redhat 6.0
	jdk 1.2.2
	jsdk 2.0
	apache 1.3
	tomcat 3.1

Anyone can help me ?
Thanks in advance
-- 
"Il n'y a pas d'etrangers, seulement des amis qu'on n'a pas rencontres."
(Proverbe irlandais).

Jean Michel Flambard
jmflamba@club-internet.fr
http://www.multimania.com/jmflambard

Re: New user

Posted by Jean Michel Flambard <jm...@club-internet.fr>.
Hi,

My CLASSPATH it's ok now and I arrived to compile and install
my web application. Thanks.

But I do not arrive to access to my servlet.

I done a new context 

-/webapps/InfoClient
	+WEB-INF
		web.wml
		+classes
			InfoClient.class (my servlet)
	InfoClient.html (allows me to access to the servlet InfoClient)


This is my web.xml file:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
    <servlet>
      <servlet-name>InfoClient</servlet-name>
      <servlet-class>InfoClient</servlet-class>
    </servlet>
    <servlet-mapping>
      <servlet-name>InfoClient</servlet-name>
      <url-pattern>/InfoClient</url-pattern>
    </servlet-mapping>
</web-app>


And I have added to my server.xml file (after the last <context
path=...:

<Context path="/InfoClient" docBase="webapps/InfoClient" debug="0"
reloadable="true" ></Context>

I try to access my InfoClient.html file:

http://localhost/InfoClient/InfoClient.html

and I don't access it.

In the InfoClient.html file, I access to my servlet:

<a href="../servlet/InfoClient>text</a>

I receive:

Not Found
The request URL/InfoClient was not found on this server

Why don't work ?
I'm running tomcat with apache
Thanks in advance



Tim Kientzle a écrit :
> 
> Specifically, you MUST have  .../jdk1.2.2/lib/tools.jar
> in your CLASSPATH.  You might need the other jar files
> in .../jdk1.2.2/lib in your CLASSPATH.
> 
>                                 - Tim Kientzle
> 
> Flambard Jean Michel wrote:
> >
> > No, my classpath contains the bin and the lib directory.
> >
> > This is:
> > CLASSPATH=/usr/local/jdk1.2.2/lib
> > PATH=/usr/local/jdk1.2.2/bin:/usr/local/jdk1.2.2/lib:...
> >
> > It is good ?
> >
> > Thanks
> >
> > Benedicte Luet wrote:
> > >
> > > Actually, that would be the lib directory, and the jar files in it... Sorry
> > > about that ;-)
> > >
> > > Benedicte
> > >
> > > Benedicte Luet wrote:
> > >
> > > > This looks like your classpath is not set properly. Make sure it includes
> > > > your jdk's bin directory.
> > > >
> > > > Benedicte
> > > >
> > > > ------------------------
> > > > Benedicte Luet
> > > > Information Technology
> > > > Embry-Riddle University
> > > >
> >
> > --
> > "Il n'y a pas d'etrangers, seulement des amis qu'on n'a pas rencontres."
> > (Proverbe irlandais).
> >
> > Jean Michel Flambard
> > jmflamba@club-internet.fr
> > http://www.multimania.com/jmflambard

-- 
Jean Michel Flambard
jmflamba@club-internet.fr
http://www.multimania.com/jmflambard
------------------------------------

Re: New user

Posted by Jean Michel Flambard <jm...@club-internet.fr>.
Hi,

My CLASSPATH it's ok now and I arrived to compile and install
my web application. Thanks.

But I do not arrive to access to my servlet.

I done a new context 

-/webapps/InfoClient
	+WEB-INF
		web.wml
		+classes
			InfoClient.class (my servlet)
	InfoClient.html (allows me to access to the servlet InfoClient)


This is my web.xml file:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
    <servlet>
      <servlet-name>InfoClient</servlet-name>
      <servlet-class>InfoClient</servlet-class>
    </servlet>
    <servlet-mapping>
      <servlet-name>InfoClient</servlet-name>
      <url-pattern>/InfoClient</url-pattern>
    </servlet-mapping>
</web-app>


And I have added to my server.xml file (after the last <context
path=...:

<Context path="/InfoClient" docBase="webapps/InfoClient" debug="0"
reloadable="true" ></Context>

I try to access my InfoClient.html file:

http://localhost/InfoClient/InfoClient.html

and I don't access it.

In the InfoClient.html file, I access to my servlet:

<a href="../servlet/InfoClient>text</a>

Why don't work ?

Thanks in advance



Tim Kientzle a écrit :
> 
> Specifically, you MUST have  .../jdk1.2.2/lib/tools.jar
> in your CLASSPATH.  You might need the other jar files
> in .../jdk1.2.2/lib in your CLASSPATH.
> 
>                                 - Tim Kientzle
> 
> Flambard Jean Michel wrote:
> >
> > No, my classpath contains the bin and the lib directory.
> >
> > This is:
> > CLASSPATH=/usr/local/jdk1.2.2/lib
> > PATH=/usr/local/jdk1.2.2/bin:/usr/local/jdk1.2.2/lib:...
> >
> > It is good ?
> >
> > Thanks
> >
> > Benedicte Luet wrote:
> > >
> > > Actually, that would be the lib directory, and the jar files in it... Sorry
> > > about that ;-)
> > >
> > > Benedicte
> > >
> > > Benedicte Luet wrote:
> > >
> > > > This looks like your classpath is not set properly. Make sure it includes
> > > > your jdk's bin directory.
> > > >
> > > > Benedicte
> > > >
> > > > ------------------------
> > > > Benedicte Luet
> > > > Information Technology
> > > > Embry-Riddle University
> > > >
> >
> > --
> > "Il n'y a pas d'etrangers, seulement des amis qu'on n'a pas rencontres."
> > (Proverbe irlandais).
> >
> > Jean Michel Flambard
> > jmflamba@club-internet.fr
> > http://www.multimania.com/jmflambard

-- 
Jean Michel Flambard
jmflamba@club-internet.fr
http://www.multimania.com/jmflambard
------------------------------------

Re: New user

Posted by Tim Kientzle <ki...@acm.org>.
Specifically, you MUST have  .../jdk1.2.2/lib/tools.jar
in your CLASSPATH.  You might need the other jar files
in .../jdk1.2.2/lib in your CLASSPATH.

				- Tim Kientzle

Flambard Jean Michel wrote:
> 
> No, my classpath contains the bin and the lib directory.
> 
> This is:
> CLASSPATH=/usr/local/jdk1.2.2/lib
> PATH=/usr/local/jdk1.2.2/bin:/usr/local/jdk1.2.2/lib:...
> 
> It is good ?
> 
> Thanks
> 
> Benedicte Luet wrote:
> >
> > Actually, that would be the lib directory, and the jar files in it... Sorry
> > about that ;-)
> >
> > Benedicte
> >
> > Benedicte Luet wrote:
> >
> > > This looks like your classpath is not set properly. Make sure it includes
> > > your jdk's bin directory.
> > >
> > > Benedicte
> > >
> > > ------------------------
> > > Benedicte Luet
> > > Information Technology
> > > Embry-Riddle University
> > >
> 
> --
> "Il n'y a pas d'etrangers, seulement des amis qu'on n'a pas rencontres."
> (Proverbe irlandais).
> 
> Jean Michel Flambard
> jmflamba@club-internet.fr
> http://www.multimania.com/jmflambard

Re: New user

Posted by Flambard Jean Michel <jm...@club-internet.fr>.
No, my classpath contains the bin and the lib directory.

This is:
CLASSPATH=/usr/local/jdk1.2.2/lib
PATH=/usr/local/jdk1.2.2/bin:/usr/local/jdk1.2.2/lib:...

It is good ?

Thanks

Benedicte Luet wrote:
> 
> Actually, that would be the lib directory, and the jar files in it... Sorry
> about that ;-)
> 
> Benedicte
> 
> Benedicte Luet wrote:
> 
> > This looks like your classpath is not set properly. Make sure it includes
> > your jdk's bin directory.
> >
> > Benedicte
> >
> > ------------------------
> > Benedicte Luet
> > Information Technology
> > Embry-Riddle University
> >

-- 
"Il n'y a pas d'etrangers, seulement des amis qu'on n'a pas rencontres."
(Proverbe irlandais).

Jean Michel Flambard
jmflamba@club-internet.fr
http://www.multimania.com/jmflambard

Re: New user

Posted by Benedicte Luet <lu...@db.erau.edu>.
Actually, that would be the lib directory, and the jar files in it... Sorry
about that ;-)

Benedicte

Benedicte Luet wrote:

> This looks like your classpath is not set properly. Make sure it includes
> your jdk's bin directory.
>
> Benedicte
>
> ------------------------
> Benedicte Luet
> Information Technology
> Embry-Riddle University
>
> Mark Lamonds wrote:
>
> > Hello;
> >
> > I also am having the same problem, if you recieve any information,
> > please forward to me.
> >
> > Thank you;
> >
> > Mark
> > ----- Original Message -----
> > From: Flambard Jean Michel <jm...@club-internet.fr>
> > To: <to...@jakarta.apache.org>
> > Sent: Monday, August 07, 2000 11:00 AM
> > Subject: New user
> >
> > > hi all,
> > >
> > > Fisrt, sorry for my bad english, I'm french.
> > >
> > > I am new on this mailing list and so I am a new Tomcat user.
> > > I am trying to compile and install my first web application
> > > with tomcat.
> > > I have a NoClassDefFoundError when I throw the 'build' file.
> > >
> > > Below the complete message:
> > > Buildfile: buil.xml
> > > Project base dir set to: /home/flambard/Projets/InfoClient
> > > Executing Target: prepare
> > > Executing Target: compile
> > > Compiling 1 source files to
> > > /home/flambard/tomcat/webapps/InfoClient/WEB-INF/classes
> > > Exception in thread "main" java.lan.NoClassDefFoundError:
> > > sun/tools/javac/Main
> > >         at
> > > org.apache.tools.ant.taskdefs.Javac.doClassicCompile(Javac.java:418)
> > >         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:218)
> > > at org.apache.tools.ant.Target.execute(Target.java, compiled Code)
> > > at org.apache.tools.ant.Project.runTarget(Project.java, Compiled Code)
> > > at org.apache.tools.ant.Project.executeTarget(Project.java:422)
> > > at org.apache.tools.ant.Main.runBuild(Main.java:240)
> > > at org.apache.tools.ant.Main.main(Main.java:191)
> > >
> > > My configuration:
> > > linux redhat 6.0
> > > jdk 1.2.2
> > > jsdk 2.0
> > > apache 1.3
> > > tomcat 3.1
> > >
> > > Anyone can help me ?
> > > Thanks in advance
> > > --
> > > "Il n'y a pas d'etrangers, seulement des amis qu'on n'a pas rencontres."
> > > (Proverbe irlandais).
> > >
> > > Jean Michel Flambard
> > > jmflamba@club-internet.fr
> > > http://www.multimania.com/jmflambard


Re: New user

Posted by Benedicte Luet <lu...@db.erau.edu>.
This looks like your classpath is not set properly. Make sure it includes
your jdk's bin directory.

Benedicte

------------------------
Benedicte Luet
Information Technology
Embry-Riddle University

Mark Lamonds wrote:

> Hello;
>
> I also am having the same problem, if you recieve any information,
> please forward to me.
>
> Thank you;
>
> Mark
> ----- Original Message -----
> From: Flambard Jean Michel <jm...@club-internet.fr>
> To: <to...@jakarta.apache.org>
> Sent: Monday, August 07, 2000 11:00 AM
> Subject: New user
>
> > hi all,
> >
> > Fisrt, sorry for my bad english, I'm french.
> >
> > I am new on this mailing list and so I am a new Tomcat user.
> > I am trying to compile and install my first web application
> > with tomcat.
> > I have a NoClassDefFoundError when I throw the 'build' file.
> >
> > Below the complete message:
> > Buildfile: buil.xml
> > Project base dir set to: /home/flambard/Projets/InfoClient
> > Executing Target: prepare
> > Executing Target: compile
> > Compiling 1 source files to
> > /home/flambard/tomcat/webapps/InfoClient/WEB-INF/classes
> > Exception in thread "main" java.lan.NoClassDefFoundError:
> > sun/tools/javac/Main
> >         at
> > org.apache.tools.ant.taskdefs.Javac.doClassicCompile(Javac.java:418)
> >         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:218)
> > at org.apache.tools.ant.Target.execute(Target.java, compiled Code)
> > at org.apache.tools.ant.Project.runTarget(Project.java, Compiled Code)
> > at org.apache.tools.ant.Project.executeTarget(Project.java:422)
> > at org.apache.tools.ant.Main.runBuild(Main.java:240)
> > at org.apache.tools.ant.Main.main(Main.java:191)
> >
> > My configuration:
> > linux redhat 6.0
> > jdk 1.2.2
> > jsdk 2.0
> > apache 1.3
> > tomcat 3.1
> >
> > Anyone can help me ?
> > Thanks in advance
> > --
> > "Il n'y a pas d'etrangers, seulement des amis qu'on n'a pas rencontres."
> > (Proverbe irlandais).
> >
> > Jean Michel Flambard
> > jmflamba@club-internet.fr
> > http://www.multimania.com/jmflambard


Re: New user

Posted by Mark Lamonds <ma...@savvion.com>.
Hello;

I also am having the same problem, if you recieve any information,
please forward to me.

Thank you;

Mark
----- Original Message ----- 
From: Flambard Jean Michel <jm...@club-internet.fr>
To: <to...@jakarta.apache.org>
Sent: Monday, August 07, 2000 11:00 AM
Subject: New user


> hi all,
> 
> Fisrt, sorry for my bad english, I'm french.
> 
> I am new on this mailing list and so I am a new Tomcat user.
> I am trying to compile and install my first web application
> with tomcat.
> I have a NoClassDefFoundError when I throw the 'build' file.
> 
> Below the complete message:
> Buildfile: buil.xml
> Project base dir set to: /home/flambard/Projets/InfoClient
> Executing Target: prepare
> Executing Target: compile
> Compiling 1 source files to
> /home/flambard/tomcat/webapps/InfoClient/WEB-INF/classes
> Exception in thread "main" java.lan.NoClassDefFoundError:
> sun/tools/javac/Main
>         at
> org.apache.tools.ant.taskdefs.Javac.doClassicCompile(Javac.java:418)
>         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:218)
> at org.apache.tools.ant.Target.execute(Target.java, compiled Code)
> at org.apache.tools.ant.Project.runTarget(Project.java, Compiled Code)
> at org.apache.tools.ant.Project.executeTarget(Project.java:422)
> at org.apache.tools.ant.Main.runBuild(Main.java:240)
> at org.apache.tools.ant.Main.main(Main.java:191)
> 
> My configuration:
> linux redhat 6.0
> jdk 1.2.2
> jsdk 2.0
> apache 1.3
> tomcat 3.1
> 
> Anyone can help me ?
> Thanks in advance
> -- 
> "Il n'y a pas d'etrangers, seulement des amis qu'on n'a pas rencontres."
> (Proverbe irlandais).
> 
> Jean Michel Flambard
> jmflamba@club-internet.fr
> http://www.multimania.com/jmflambard