Hi,

I have a problem and would like to read your opinions about it. If
this issue is documented somewhere, please let me know (I've been
searching through the documentation and mailling lists, without
success).

I have a mapping file with (e.g.) ten classes mapped. This mapping is
used in different projects. Some projects have all the ten classes in
the classpath and some doesn't.

The projects that contain all the classes work fine. In the projects
that doesn't have all the classes in the classpath, the Castor throws
an Exception when I'm initializating the Marshaller with the mapping
file:

org.exolab.castor.mapping.MappingException: Could not find the class
model2.TesteModel2
        at 
org.exolab.castor.mapping.loader.MappingLoader.createDescriptor(MappingLoader.java:420)
        at 
org.exolab.castor.xml.XMLMappingLoader.createDescriptor(XMLMappingLoader.java:227)
        at 
org.exolab.castor.mapping.loader.MappingLoader.loadMapping(MappingLoader.java:313)
        at org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:292)
        at org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:247)
        at org.exolab.castor.xml.Marshaller.setMapping(Marshaller.java:561)
        at XmlSerializer.getMarshaller(XmlSerializer.java:68)
        at XmlSerializer.serialize(XmlSerializer.java:51)
        at TesteProblemaCastor.main(TesteProblemaCastor.java:31)

The classes that aren't in the classpath are not used by the project.
So, except by the Castor initialization, everything could work
correctly.

After all, this is my question: is there a way to instruct Castor to
do "lazy loading" of the mappings?

I'm using the version 0.9.9.1 (yes, really).

Thanks.

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

    http://xircles.codehaus.org/manage_email


Reply via email to