Hi Michael,
 
is there a particular reason as to why you have put the Castor JAR(s) into Tomcat's shared/lib directory ? Imho, moving the Castor JAR to WEB-INF/lib should remove your problem.
 
Werner


From: Michael Thome [mailto:[EMAIL PROTECTED]
Sent: Freitag, 28. Oktober 2005 16:05
To: [email protected]
Subject: [castor-user] Confusing ClassLoader behavior by Unmarshaller

I'm baffled by a situation I seem to have got myself into:   I'm using castor in a web services application (AXIS) both for grokking SOAP messages (standard messaging data binding) and for local-disk XML file i/o.  Now the problem is when I unmarshal a file that has only a mydb.Foo object (introspective) all is well, but if I unmarshal a file that has an ArrayList of mydb.Foo objects, I get a ClassNotFoundException.

I know that there are at least three classloaders running around here - the system/CLASSPATH, the tomcat shared/lib and the axis/WEB-INF/lib (each layered on top of the previous one).  mydb.Foo is in the outermost one (where it belongs with my application), castor is lower (in the tomcat shared lib).

I've tried explicitly unmarshaller.setClassLoader() to no effect.  In this situation, I'm not using a mapping (introspection only).  I'm continuing to dig through castor sources, but so far no luck.

Suggestions?  Thanks,
Michael

PS - I'm currently using 0.9.6

--
Michael Thome
BBN Technologies 10 Moulton St, Cambridge MA 02138 USA
phone: +1 617 873 1853
------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

Reply via email to