tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pablo Morillas" <pa...@sortes.com>
Subject Re: Automaticaly update the servlets
Date Wed, 13 Jun 2001 00:03:04 GMT
Well. When I compile the servlet I haven't got problems with the java.sql
package. I have problems when I try to run this into Tomcat. I am using
Tomcat as a service in a Win2K box. I suspect that my problem is that the
JVM that starts when the service start is using a wrong CLASSPATH.

Could it be true?

Thanks.

==================================
Pablo Morillas
http://www.sortes.com
pablo@sortes.com
==================================
----- Original Message -----
From: "Luba Powell" <luba999@bellatlantic.net>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, June 12, 2001 11:29 PM
Subject: Re: Automaticaly update the servlets


> did you:
> import java.sql.*;
>
> ----- Original Message -----
> From: "Pablo Morillas" <pablo@sortes.com>
> To: <tomcat-user@jakarta.apache.org>
> Sent: Tuesday, June 12, 2001 5:23 PM
> Subject: Re: Automaticaly update the servlets
>
>
> > Ok, but my problem is that when I put in a servlet
> > 'Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")' I get the message
> > NoClassDefFoundError.
> >
> > ==================================
> > Pablo Morillas
> > http://www.sortes.com
> > pablo@sortes.com
> > ==================================
> > ----- Original Message -----
> > From: "Luba Powell" <luba999@bellatlantic.net>
> > To: <tomcat-user@jakarta.apache.org>
> > Sent: Tuesday, June 12, 2001 11:21 PM
> > Subject: Re: Automaticaly update the servlets
> >
> >
> > > This jar is in my classpath yet becouse if I type in the DOS Console
> "java
> > > sun.jdbc.odbc.JdbcOdbcDriver" I get the message: "NoSuchMethodError:
> main"
> > > instead of "NoClassDefFoundError?
> > >
> > > This is correct.  This class does not have main method.
> > >
> > > ----- Original Message -----
> > > From: "Pablo Morillas" <pablo@sortes.com>
> > > To: <tomcat-user@jakarta.apache.org>
> > > Sent: Tuesday, June 12, 2001 5:12 PM
> > > Subject: Re: Automaticaly update the servlets
> > >
> > >
> > > > Yes. Finally I have get the proper result. Mines servlets are
> > > automatically
> > > > updated. Thanks to all.
> > > >
> > > > But, in other side, when I've tried to use the jdbc.odbc driver I
have
> > get
> > > > the message NoClassDefFoundError. I've resolved it setting another
> line
> > in
> > > > the wrapper.properties file:
> > > > wrapper.class_path=$(wrapper.java_home)\jre\lib\rt.jar
> > > >
> > > > This jar is in my classpath yet becouse if I type in the DOS Console
> > "java
> > > > sun.jdbc.odbc.JdbcOdbcDriver" I get the message: "NoSuchMethodError:
> > main"
> > > > instead of "NoClassDefFoundError".
> > > >
> > > > My question is: what classpath use jk_nt_service if no definition is
> set
> > > for
> > > > it in the wrapper.properties file?
> > > >
> > > > Thanks to all that are bearing me. ;-)
> > > >
> > > > ==================================
> > > > Pablo Morillas
> > > > http://www.sortes.com
> > > > pablo@sortes.com
> > > > ==================================
> > > > ----- Original Message -----
> > > > From: "Milt Epstein" <mepstein@uiuc.edu>
> > > > To: <tomcat-user@jakarta.apache.org>
> > > > Sent: Friday, June 08, 2001 6:41 PM
> > > > Subject: Re: Automaticaly update the servlets
> > > >
> > > >
> > > > > On Fri, 8 Jun 2001, Pablo Morillas wrote:
> > > > >
> > > > > > Thanks. I beleive that I'm seen the light. My problem is that
my
> > > > > > system class loader (in my server) is loading my classes instead
> > > > > > Tomcat, ins't it?
> > > > >
> > > > > Well, I won't guarantee it 100%, but it very well could be the
> > problem.
> > > > >
> > > > > >                    Could anyone give me an address where I can
> find
> > > > > > information about the way that Tomcat class loader runs?
> > > > >
> > > > > I don't have a specific source, but I believe there are
> > > > > tutorials/articles about on the web -- do a search at
> www.google.com.
> > > > > I'm pretty sure there was a JDC Tech Tips about classloaders
> (they're
> > > > > all up on the JDC site), and other sites (e.g. javaworld) may have
> > > > > stuff on it as well.  You can also check the tomcat
> > > > > documentation/source.
> > > > >
> > > > >
> > > > > > How can I force to Tomcat Class loader to take my servlets?
> > > > >
> > > > > Simply change your classpath so that the relevant directories
> > > > > (.../WEB-INF/classes, and probably .../WEB-INF/lib as well) are
not
> > > > > included.  Do that, try again, and let us know whether it worked.
> > > > >
> > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "Randy Layman" <randy.layman@aswethink.com>
> > > > > > To: <tomcat-user@jakarta.apache.org>
> > > > > > Sent: Friday, June 08, 2001 4:25 PM
> > > > > > Subject: RE: Automaticaly update the servlets
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > The problem is that the System class loader (the one that
loads
> > your
> > > > > > > CLASSPATH environment variable) is keeping a cache around
of
the
> > > > class.
> > > > > > > This is why Milt (correctly) told you to remove the
> > WEB-INF/classes
> > > > from
> > > > > > > your classpath if you want the auto-reloading to work as
it is
> > > > supposed
> > > > > > to*.
> > > > > > > If the System class loader loads your class then its
impossible
> > for
> > > > Tomcat
> > > > > > > to load it, and if Tomcat doesn't load it in the first
place,
> then
> > > it
> > > > > > can't
> > > > > > > unload and reload it.
> > > > > > >
> > > > > > > Randy
> > > > > > >
> > > > > > > * - Many people have problems with the way that auto-reloading
> > works
> > > > in
> > > > > > > Tomcat.  A large number have problems like yours, and large
> > numbers
> > > > also
> > > > > > > complain that the auto-reloading doesn't work for non-servlet
> > > classes
> > > > > > (which
> > > > > > > it doesn't due to complexity of the problem).
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Pablo Morillas [mailto:pablo@sortes.com]
> > > > > > > > Sent: Friday, June 08, 2001 10:29 AM
> > > > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > > > Subject: Re: Automaticaly update the servlets
> > > > > > > >
> > > > > > > >
> > > > > > > > Yes, it is in my classpath. But I don't believe that
the
> > > > > > > > classpath is the
> > > > > > > > problem becouse when I start Tomcat as a service it
runs
> > > > > > > > properly. If I
> > > > > > > > change a .jsp it reload properly.
> > > > > > > > I don't know what is happen but, when I delete the
class
file
> > from
> > > > the
> > > > > > > > WEB-INF/classes the servlet run properly (incredible).
Then,
> > > > > > > > after I restart
> > > > > > > > the server a error was reported. I compile it another
in the
> > > > > > > > WEB-INF/classes
> > > > > > > > without restart Tomcat and it runs ok.
> > > > > > > > I suppose that the servlet file is in any cache of
Tomcat,
> > > > > > > > but I can be
> > > > > > > > perfectly wrong. Uses Tomcat any type of GUID to run
classes?
> > > > > > > >
> > > > > > > > I don't know what's happen. Please, advice.
> > > > > > > >
> > > > > > > > ==================================
> > > > > > > > Pablo Morillas
> > > > > > > > http://www.sortes.com
> > > > > > > > pablo@sortes.com
> > > > > > > > ==================================
> > > > > > > > ----- Original Message -----
> > > > > > > > From: "Milt Epstein" <mepstein@uiuc.edu>
> > > > > > > > To: <tomcat-user@jakarta.apache.org>
> > > > > > > > Sent: Friday, June 08, 2001 3:03 PM
> > > > > > > > Subject: Re: Automaticaly update the servlets
> > > > > > > >
> > > > > > > >
> > > > > > > > > On Fri, 8 Jun 2001, Pablo Morillas wrote:
> > > > > > > > >
> > > > > > > > > > Hello Filip.
> > > > > > > > > >
> > > > > > > > > > I didn't know that but, unfortunately the
servlet is in
> the
> > > > > > > > > > WEB-INF/classes directory. The scheme is
that I start
> tomcat
> > > and
> > > > I
> > > > > > > > >
> > > > > > > > > Is WEB-INF/classes in your classpath?  Because
it
shouldn't
> > > > > > > > be if you
> > > > > > > > > want reloading to work.
> > > > > [ ... ]
> > > > >
> > > > > Milt Epstein
> > > > > Research Programmer
> > > > > Software/Systems Development Group
> > > > > Computing and Communications Services Office (CCSO)
> > > > > University of Illinois at Urbana-Champaign (UIUC)
> > > > > mepstein@uiuc.edu
> > > > >
> > > >
> > >
> >
>


Mime
View raw message