It is isn't really meant to be part of the classpath, don't put it in
WEB-INF/lib.  Put it in some other location under WEB-INF.  Should work fine. 
Tomcat extracts resources (in the classpath) to its work directory.  I don't
entirely know why, but it might be for performance reasons?  Anyway, if you are
going to overload the purpose of WEB-INF/lib, you are going to have to expect to
run into clashes with container (and not just Tomcat, I imagine).

Jake

Quoting Oliver Kuntze <[EMAIL PROTECTED]>:

> 
> Hi QM,
> 
> thanks a lot for the prompt answer!
> 
> Unfortunately I have to provide some application resources in a JAR.
> 
> I am using hibernate in my persistence layer. I generate my persistent
> classes and their O/R mappings directly from the database and deploy that
> stuff to my app. If you don't want to specify all hibernate mappings that
> hibernate should use one by one you have to provide these mappings in a JAR
> and read it into hibernate. In that way I don't have to touch any classes
> in my persistence layer. I just tell hibernate "Use whatever mapping you
> find in this JAR.". The only thing I have to do when implementing the
> persistence layer of a new app is then call the middlegen hibernate plugin
> and generate the app specific bos and mappings. The rest is implemented in
> framework classes that don't have to be changed.
> 
> I tried to rename the JAR to a ZIP but that does not get accepted and an
> exception is thrown.
> 
> Do you have any ideas how to solve this problem?
> 
> Desperately,
> 
> Oliver
> 
> 
> 
> 
>                       QM <qm300
>                       @brandxdev.net>          To:      Tomcat Users List
> <[EMAIL PROTECTED]>
>                                                cc:
>                       17.08.2004 22:28         Subject: Re: Class loader
> looks in Tomcat work directory and not in webapp directory for
>                       Please respond           resources
>                       to "Tomcat Users
>                       List"
> 
> 
> 
> 
> 
> 
> On Tue, Aug 17, 2004 at 08:43:54PM +0200, Oliver Kuntze wrote:
> : For  the second resource lookup (the JAR) the class loader searches in
> : "Tomcat 5.0\work\Catalina\localhost\rad_webmodule\loader " (Tomcat's work
> : directory) and not in the webapp classpath under "Tomcat 5.0
> : \webapps\rad_webmodule\WEB-INF\classes" (or in the WEB-INF/lib) where the
> : JAR is located. Why?
> 
> That just seems to be where Tomcat5 deploys JARs from WAR files...
> probably for easy access.
> 
> Is there any reason you're trying to manipulate JARs directly within
> your app?  If you need to get to a set of files, why not place them
> under a directory structure in the classpath?
> 
> -QM
> 
> --
> 
> software  -- http://www.brandxdev.net
> tech news -- http://www.RoarNetworX.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to