It's a classloader problem with Tomcat 3.2.x
Patrick
Markus Garscha wrote:
>oh,
>
>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?
>
>thanx
>markus
>
>
>* Markus Garscha <[EMAIL PROTECTED]> [2001-11-27 18:25]:
>
>>hi!
>>
>>i found it! the problem is, that i have serveral .jar in WEB-INF/lib and
>>CLASSPATH of tomcat. "Agent" uses=20
>>
>>import org.exolab.castor.*
>>
>>which is not the problem, because castor-*.jar is listet in CLASSPATH
>>and so tomcat knows about it.=20
>>When call the constructor castor tries to load a database driver, e.g.
>>postgres.jar which lies in WEB-INF/lib and is only available for system
>>wide use.=20
>>at this point tomcat breaks with an exception:
>>java.lang.ClassNotFoundException: org.postgresql.Driver
>>
>>this is strange, because the .jar which contains
>>de.gama.kadr.agent.Agent also lies in WEB-INF/lib and tomcat detects
>>it!=20
>>
>>???
>>
>>cu
>>markus
>>
>>
>>* Markus Garscha <[EMAIL PROTECTED]> [2001-11-26 20:45]:
>>
>>>hi!
>>>
>>>i'm playing arround with tomcat + castor. but somehow i can't get this
>>>work:
>>>
>>>index.jsp:
>>>...
>>><jsp:useBean id="agent" class="de.gama.kadr.agent.Agent" scope="session"
>>>
>>>
>>></jsp:useBean>
>>>
>>>
>>>and the constructor "Agent" sets up the jdo connection to a database.
>>>where to place "mapping.xml" and "database.xml"?
>>>has anyone a working example?
>>>please post it, i think it would be great for newbie's to start with
>>>tomcat + castor...
>>>
>>>thanx
>>>markus
>>>
>>>--
>>>-------------------------------------------------------------------------------
>>> Markus Garscha email: [EMAIL PROTECTED]
>>> Hartmannstr. 129 fon: 09131/626715
>>> 91058 Erlangen fax: +49 89 244356966
>>> pgp-keyid: 0xEE18AF3B
>>>-------------------------------------------------------------------------------
>>>
>>
>>
>>--
>>-------------------------------------------------------------------------------
>> Markus Garscha email: [EMAIL PROTECTED]
>> Hartmannstr. 129 fon: 09131/626715
>> 91058 Erlangen fax: +49 89 244356966
>> pgp-keyid: 0xEE18AF3B
>>-------------------------------------------------------------------------------
>>
>
>
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev