----- Original Message ----- From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, July 22, 2003 1:18 PM Subject: RE: Weird Problems installing servlets in Tomcat
Howdy, >I have had no luck getting Tomcat to load War files yet; I've been trying >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 it, >right? Tomcat uses FileUpload itself doesn't it? Otherwise I would put it >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 confused; >it seems to contradict both itself and you! According to the Quick Start >section, JAR files containing resource which are to be shared across all >web >applications are to be placed in $CATALINA_HOME/shared/lib. Later, in the >detailed description of the class loaders, it says that JAR resources which >need to be shared across all web applications (except Tomcat itself) should >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 to >suspect is fairly critical. When I first copied commons-fileupload-1.0.jar >into the $CATALINA_HOME/commons/lib, I noticed that there was already a jar >in that directory with the name commons-upload.jar. I assumed that was an >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 guys! Rhino --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
