hmmm,

that means, that the only way is to put the required .jar's in tomcats
own CLASSPATH?
i have to install my model-jar (described in mapping.xml) in CLASSPATH
too, becaus castor uses a Class.forName()?

cu
markus


* Drew Davidson <[EMAIL PROTECTED]> [2001-11-27 19:15]:
> Markus Garscha wrote:
> 
> > when i put postgres.jar in the CLASSPATH of tomcat then tomcat fails
> > with:
> >
> > org.exolab.castor.mapping.MappingException: Could not find the class
> > de.gama.kadr.data.Person
> >
> > which is in the same jar as Agent. when i put the whole .jar in the
> > tomcat CLASSPATH then it works. why dosen't it work just putting it in
> > WEB-INF/lib directory?
> 
> This is a ClassLoader issue.  The ClassLoader for the the startup of Tomcat owns the
> CLASSPATH, which includes the jar files in Tomcat's lib directory.  For dynamic
> reloading of servlets Tomcat uses a different class loader for each web application.
> When Class.forName() is used it does not know about anything but the default
> ClassLoader; in this case that is the one at the Tomcat lib level.  Therefore 
>anything
> that uses Class.forName() will not work unless those classes are explicitly listed in
> the CLASSPATH at startup.
> 
> In know, it sucks royally and I wish that Sun would have fixed this long ago with 
>some
> way of registering ClassLoaders.
> 
> - Drew
> --
> Drew Davidson
> Chief Scientist/Director, Research & Development
> OGNL Research Labs
> (520) 531-1966
> (520) 370-5117 (cell)
> (520) 531-1965 (fax)
> [EMAIL PROTECTED]
> http://www.paintyourselfsilly.com
> http://www.ognl.org
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev

-- 
-------------------------------------------------------------------------------
 Markus Garscha                        email: [EMAIL PROTECTED] 
 Hartmannstr. 129                        fon: 09131/626715 
 91058 Erlangen                          fax: +49 89 244356966 
                                   pgp-keyid: 0xEE18AF3B  
-------------------------------------------------------------------------------

Attachment: msg02766/pgp00000.pgp
Description: PGP signature

Reply via email to