tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nacho <na...@siapi.es>
Subject RE: Tomcat an not find JDBC driver on Win98.
Date Sat, 16 Sep 2000 17:37:29 GMT
I've deleted the orginal message as it has a JS virus on it, David take
care of that, please.

For the Original question, Tomcat do not load zip packed libraris , from
%TOMCAT_HOME%/lib nor from WEB_INF/lib it only load libraries packed as
Jars, and the Oracle JDBC drivers are packed as zips so it did not load
in either dir.

The Easiest way to curate this is simply rename your zip files to jar, i
personally rename class12.zip to class12.zip.jar and everything goes
fine, hope this helps..

Saludos ,
Ignacio J. Ortega


> -----Mensaje original-----
> De: Kitching Simon [mailto:Simon.Kitching@orange.ch]
> Enviado el: sábado 16 de septiembre de 2000 19:30
> Para: 'tomcat-user@jakarta.apache.org'
> Asunto: RE: Tomcat an not find JDBC driver on Win98.
> 
> 
> Hi,
> 
> > -----Original Message-----
> > From:	David Xu [SMTP:david@vendio.com]
> > Sent:	Saturday, September 16, 2000 12:37 AM
> > To:	tomcat-user@jakarta.apache.org
> > Subject:	Tomcat an not find JDBC driver on Win98.
> > 
> > I installed Tomcat 3.1 on Win98. Since I want to access 
> oracle from my
> > servlet so I put oracle
> > JDBC driver classes111b.zip under ..\tomcat\lib. But my 
> servlet complains
> > that the JDBC driver 
> > class can not be found. So I put the same zip file under
> > ..\webapps\myapp\lib, it still won't work.
> > Finally, I modified the tomcat.bat to add classes111b.zip to the
> > classpath, it works!!!
> >  
> > I have set up the same thing on a Linux and put 
> classes111b.zip under
> > ../tomcat/lib and it works.
> >  
> > Looks to me like Tomcat 3.1 on Win98 can not automatically 
> recognize a zip
> > file as a classpath.
> >  
> > Can anybody tell me why?
> 	[Kitching Simon]  
> 
> 	There's nothing magical about how tomcat's classpath 
> gets set up.
> 	It's all done with standard shell-script (unix) or 
> batch file (win).
> 
> 	Have a look at the difference between "startup.sh" and
> "startup.bat".
> 
> 	startup.sh (used on unix) is clever enough to look for 
> all files in
> the
> 	$TOMCAT_HOME/lib directory, and add them all to the CLASSPATH
> 	environment variable. Note that it doesn't care at all what the
> suffix is,
> 	any file gets added to the path, so better not put 
> non-library files
> in
> 	this directory!
> 
> 	startup.bat (windows) on the other hand, only adds an 
> explicit set
> 	of files to the classpath. Either the author of this 
> wasn't quite as
> 	clever as the author of startup.sh, or else it simply wasn't
> possible
> 	to do it in a dos batch file.
> 
> 	So you could just go with your current fix of adding it to the
> classpath
> 	on windows before calling the tomcat "startup.bat" file. Or you
> could
> 	hack the tomcat startup.bat file.
> 
> 	I suggest, however, that you put the library in your 
> app/WEB-INF/lib
> 	directory instead; the point of this is that if you 
> ever move the
> webapp,
> 	or make another installation, then you just need to 
> copy the wepapp
> 	directory tree (including WEB-INF) to have a fully-functioning
> webapp
> 	at the other end. If you have special libs in the 
> tomcat directory,
> then
> 	it's harder to move webapps around.
> 
> 	Two notes: 
> 
> 	(a) above you said you tried "webapps/myapp/lib". I presume
> 	you mean "webapps/myapp/WEB-INF/lib".
> 
> 	(b) I think that tomcat only recognises ".jar" files in the
> WEB-INF/lib
> 	directory, not ".zip", so try changing the suffix on 
> the ".zip" file
> 	to the standards-compliant ".jar" suffix. They are 
> *not* the same,
> 	although windows developers tend to treat them as identical. One
> 	is a compression format, one is a java archive file - they just
> happen
> 	to be compatible at the moment.
> 
> 	Hope this answers your question..
> 
> 	Regards,
> 
> 	Simon
> >  
> 

Mime
View raw message