Re: [Resin-interest] Classpath problem
Hi Joe, Thanks, I did remove it. Not that it helped ;) There was more to the messages, basically going down the list of classes that were undefined. I have changed the package the servlet is in to be in the same hierarchy as others being run and that has somehow resolved this issue, even though the rest of the servlets don't use the apache commons. I have no idea why it's now working again, but I'll be grateful for it. Thanks for the help! Janene McCrillis -- Message: 3 Date: Mon, 10 Sep 2007 08:46:22 -1000 From: Joe Dane <[EMAIL PROTECTED]> Subject: Re: [Resin-interest] Classpath problem To: General Discussion for the Resin application server Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed I will reiterate Daniel's good advice: never put application libraries/classes in the "global" classpath, unless you are absolutely certain you know what you're doing. Even then, you probably should avoid the practice. As to your particular problem, I notice that the error message seems a bit odd: On Sep 7, 2007, at 10:32 AM, Janene McCrillis wrote: > The resin error log file shows this: > [2007/09/07 14:05:59] Unresolved compilation problems: > The import org.apache cannot be resolved > Is that the entire message? That would seem to indicate not a library problem at all, but a compilation problem. In particular, that you've got the nonsensical statement import org.apache somewhere. Actually, I've noticed something that I consider fascinating, which is that when I do an over-hasty compile/deploy and I miss the fact that one of my Java classes has compilation errors, resin (which has no access to the source) presents me with an error message like the one above, and includes an error message from the *compiler*. Fascinating, because it seems to mean that even though the compile failed, the compiler produced some sort of object code which indicates the error, and the loading JVM is able to read that code and recreate the compiler message. -- joe ** ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Classpath problem
Hi Daniel. I do understand your point, but resin is not finding the library no matter where I have it, in one place or both. I don't really want to have it in my main resin library directory for the reason you mentioned, allowing different apps to have different versions, so I've removed it, but it still isn't finding the library. Any ideas? TIA! Janene McCrillis NatureServe Senior Software Engineer 703-797-4806 [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel López Sent: Monday, September 10, 2007 2:55 AM To: General Discussion for the Resin application server Subject: Re: [Resin-interest] Classpath problem Having the same library twice in the classpath is a sure recipe for unexpected behaviour, as depending on the way some classes are loaded/used, you will get ClassDefNotFoundException and similar problems. AFAIK, there is no real solution apart of keeping just one version of the class in the classpath of your webapp. (Note that you can have two versions for different webapps, as they can have different "classpaths") S! D. ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] Classpath problem
I have a problem with my classpath that has me baffled. I'm using the Apache commons libraries in a small servlet. I have the Apache commons jar files in both my web-app library directory and also in my resin library directory, but the servlet fails to start because of unresolved compilation issues with the apache libraries. I'm using Resin 2.1.17, and cannot upgrade right now, on Windows XP XP2, with Apache 2.0.59 (ditto). What really gets me is this was working for awhile (wild cheers), then stopped (sob). The libraries are still there and I didn't change the servlet code. I've re-booted and restarted and stood on my head, but it's not resolving this path issue. Here's the classpath according to the resin stdout log file, and lo and behold, the commons libraries are listed: Classpath=C:\Program Files\resin-2.1.17\classes;C:\Program Files\resin-2.1.17\lib\resin.jar;C:\Program Files\java\j2sdk1.4.2_13\lib\tools.jar;C:\Program Files\java\j2sdk1.4.2_13\jre\lib\rt.jar;C:\Program Files\resin-2.1.17\lib\commons-fileupload-1.2.jar;C:\Program Files\resin-2.1.17\lib\commons-io-1.3.2.jar;C:\Program Files\resin-2.1.17\lib\dom.jar;C:\Program Files\resin-2.1.17\lib\jaxp.jar;C:\Program Files\resin-2.1.17\lib\jmx.jar;C:\Program Files\resin-2.1.17\lib\jsdk23.jar;C:\Program Files\resin-2.1.17\lib\jta_101.jar;C:\Program Files\resin-2.1.17\lib\sax.jar;C:\Program Files\resin-2.1.17\lib\webutil.jar The resin error log file shows this: [2007/09/07 14:05:59] Unresolved compilation problems: The import org.apache cannot be resolved I'm at a loss. Is there some other trick? Janene ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest