tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rhino" <>
Subject Re: Weird Problems installing servlets in Tomcat
Date Tue, 22 Jul 2003 19:35:08 GMT

----- Original Message ----- 
From: "Shapira, Yoav" <>
To: "Tomcat Users List" <>
Sent: Tuesday, July 22, 2003 1:18 PM
Subject: RE: Weird Problems installing servlets in Tomcat


>I have had no luck getting Tomcat to load War files yet; I've been
>various things for hours but no joy yet....

| This an issue: it means your tomcat installation is screwed up.  Resolve
| this before you proceed with more development.

Believe me, I had no plan to do more development until I'd resolved this
problem ;-) I couldn't do much of ANYTHING on the server with Tomcat the way
it was anyway ;-)

>the screen. In fact, commons-fileupload-1.0.jar was in
>$CATALINA_HOME/common/lib (and still is). I think that's where I want
>right? Tomcat uses FileUpload itself doesn't it? Otherwise I would put
>in the /shared path, right?

| All those three "right?" questions are correct.

Okay, then at least I understood the HOWTO correctly.

>I've been reading the HOWTO that you cited and I'm getting a bit
>it seems to contradict both itself and you! According to the Quick
>section, JAR files containing resource which are to be shared across
>applications are to be placed in $CATALINA_HOME/shared/lib. Later, in
>detailed description of the class loaders, it says that JAR resources
>need to be shared across all web applications (except Tomcat itself)
>be put in $CATALINA_HOME/lib, not shared/lib. I suspect that the Quick

| Make sure you're reading the documentation for the appropriate tomcat
| version, i.e. 4.1 and not 4.0 or 5.0.  If confused, the classloader
| how-to trumps the Quick Start guide.

I was definitely reading the Tomcat 4.1 docs. The Quick Start I was
referring to was the brief precis at the start of the Class Loader HOWTO; in
other words, the document was inconsistent within itself.

>There's one other thing that I didn't post earlier which I'm starting
>suspect is fairly critical. When I first copied
>into the $CATALINA_HOME/commons/lib, I noticed that there was already a
>in that directory with the name commons-upload.jar. I assumed that was
>old version of the jar and deleted it.

| You assumed correctly, but took the wrong action.  As I've mentioned a
| couple of times now, those two jars are different APIs of the fileupload
| component.  Soemthing which compiles against one jar won't compile
| against the other.  Therein lies your, and tomcat's internal, problem.

| What you should have done is keep the older file there and put your
| fileupload in your WEB-INF/lib directory.

| You might find it easier to start with a new installation of tomcat.
| Don't touch the common/lib, server/lib, shared/lib directories.  Only
| put libraries under the WEB-INF/lib directory of your webapp.

Combining your remarks with John's and now Andrews, I'm satisfied that all I
really need to do to get everything working is put
commons-fileupload-beta-1.0.jar in the /common/lib and put the
commons-fileupload-1.0.jar in the /shared-lib and everything should work
correctly again.

Two small problems though:
1. Where do I find a binary of the commons-fileupload-beta-1.0.jar? I can
find the source for it but I don't have a C compiler so I need a binary. The
only binary seems to be the commons-fileupload-1.0.jar. Or would I be better
asking this on the commons-user mailing list?
2. Why is the Tomcat on my Windows box working? I've deleted the beta jar
from /common/lib and everything still works fine there. I don't have another
copy of either the beta or the 1.0 jar anywhere else in that copy of Tomcat.
Shouldn't Tomcat on the Windows box be failing the same way? Mind you, I
don't import WAR files on the Window box; Eclipse and Sysdeo take care of
everything for me.

I'm pretty confident now that everything will work again as soon as I put
the beta jar back in the /common/lib and put the current jar in the
/shared/lib. (I'll be doing that on both the Windows and the Linux boxes,
just to be safe, as soon as I find the binary of the beta jar.)

Even though things aren't actually working again yet, I really appreciate
all the help that you, John, and Andrew have rendered. It's much appreciated


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message