Hi Benson,

by default Castor searches for Xerces serializer as it is contained in
xerces.jar. As you are on Java 5 you can change this behaviour through
castor.properties file so Castor uses Xerces implementation included in
Java 5. The problem is that they changed package names when they
integrated Xerces into Java 5.

# Defines the (default) XML serializer factory to use by Castor, which
# must implement org.exolab.castor.xml.SerializerFactory; default is
# org.exolab.castor.xml.XercesXMLSerializerFactory
#
# When using Castor XML with JDK 5.0, you may switch to the
# XercesJDK5XMLSerializerFactory which will use the Xerces instance as
# shipped with the JDK itself; this avoids having to download another
# Xerces instance and installing it.
org.exolab.castor.xml.serializer.factory=org.exolab.castor.xml.XercesXMLSerializerFactory
#org.exolab.castor.xml.serializer.factory=org.exolab.castor.xml.XercesJDK5XMLSerializerFactory

Regards
Ralf


Benson Margulies schrieb:
> Which of the dependencies on
> http://www.castor.org/dependencies.html#Castor-XML is at issue here? I'm
> in a 1.5 JDK.
> 
> java.lang.RuntimeException: Could not instantiate serializer
> org.apache.xml.serialize.XMLSerializer:
> java.lang.ClassNotFoundException: org.apache.xml.serialize.XMLSerializer
>     at
> org.exolab.castor.xml.XercesSerializer.<init>(XercesSerializer.java:50)
>     at
> org.exolab.castor.xml.XercesXMLSerializerFactory.getSerializer(XercesXMLSerializerFactory.java:32)
>     at
> org.exolab.castor.xml.util.XMLParserUtils.getSerializer(XMLParserUtils.java:223)
>     at
> org.castor.xml.AbstractInternalContext.getSerializer(AbstractInternalContext.java:345)
>     at
> org.exolab.castor.xml.Marshaller.configureSerializer(Marshaller.java:342)
>     at org.exolab.castor.xml.Marshaller.setWriter(Marshaller.java:336)
>     at org.exolab.castor.xml.Marshaller.<init>(Marshaller.java:324)
>     at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:727)
>     at com.basistech.excedrin.model.Model.write(Model.java:46)
>    

-- 

Syscon Ingenieurbüro für Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
72127 Kusterdingen
Germany

Tel.   +49 7071 3690 52
Mobil: +49 173 9630135
Fax    +49 7071 3690 98

Internet: www.syscon.eu
E-Mail: [EMAIL PROTECTED]

Sitz der Gesellschaft: D-72127 Kusterdingen
Registereintrag: Amtsgericht Stuttgart, HRB 382295
Geschäftsleitung: Jens Joachim, Ralf Joachim

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

    http://xircles.codehaus.org/manage_email


Reply via email to