|
I've been through the various posts about running
castor under containers and have put together what I think is the right
way...
The mapping and database xml files are in the
web-inf/classes directory. Castor, castor-xml,xercesIMPL and the jdbc driver are
in the web-inf/lib directory
When I try and run the following code as part
of a web application I get the following exception... If I run the same
code in an application runner harness it works perfectly... Any ideas would be
greatly appreciated!
_mapping = new
Mapping(getClass().getClassLoader());
_mapping.setLogWriter(writer); InputStream mapping = this.getClass().getClassLoader().getResourceAsStream( MappingFile ); _mapping.loadMapping(new InputSource (mapping));
exercises = new
JDO();
exercises.setLogWriter(writer); exercises.setDatabaseName("exercises"); InputStream db = this.getClass().getClassLoader().getResourceAsStream( DatabaseFile ); exercises.loadConfiguration(new InputSource (db),null,null); java.lang.NoClassDefFoundError:
org/apache/xml/serialize/XMLSerializer
at org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:141) at org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:128) at org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.ja 0) at org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:409) at Proteus.ERPSync.ERPSync.prepareJDOConnections(ERPSync.java:255) Along the same lines; there was a thread a little while ago about
accessability of the mapping files to EJBs... The answer seemed to be to create
a jdo and bind it into the jdni; is there any problems with doing that or is
that the best way to go ?
Thanks! Colin
---------------------------
Colin Canfield [EMAIL PROTECTED] Web Consultant 0412 197 943 Explorative Software Pty Ltd www.exsoft.com.au |
