Hi,
 I am currently having problems with the castor marshaller and classloaders. 
 My code works in the unit tests but fails once included in a netbeans RPC -
the problem looks to be the classloader and the modules within the RPC. 
 
 I can resolve the issue of the classloader with the code:
      Marshaller m = new Marshaller();
      Mapping mapping = new
Mapping(Thread.currentThread().getContextClassLoader());
      mapping.loadMapping("c:\\temp\\mapping.xml");
      m.setMapping(mapping);
      m.marshal(this, writer);

 But this forces me to write a mapping file, which I do not have available
and do not really want to generate.

 Is it possible to set the classloader for the marshaller without having to
define a mapping file, e.g. have it use the default structure it would
generated without a mapping file? (If I skip the loadMapping then the
setMapping gives an exception saying a mapping must be loaded first....)

Thanks in Advance,
  Brian 

-- 
View this message in context: 
http://www.nabble.com/Changing-classloader-in-marshaller-tp17480800p17480800.html
Sent from the Castor - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to