Daniel, glad to see it worked for you. How about contributing a bit of your time back ,and write up a small HOW-TO that describes the problem and the (re)solution. That would be appreciated, indeed.
Werner Daniel Nilsson wrote: > Hi! > > I followed your example and changed the > org.exolab.castor.xml.serializer.factory - property to > org.exolab.castor.xml.XercesXMLSerializerFactory instead of the default > and it worked! > I didn't even have to add the Xexces-libraries, so it seems they are present > in some way > > Thank you Werner for your fast response with a solution! > //Daniel > > ps > Why do I get a feeling that Websphere is not the first choice of server for > you ;) Hmm, having worked for Morgan Stanley for three years, and having had to use WebSphere for all those years didn't create a smooth experience, to be honest. Besides, I am more in favour of open source products these days .. ;-). > > > > On Thu, Apr 23, 2009 at 8:59 PM, Werner Guttmann <[email protected]>wrote: > >> Daniel, >> >> the exception seems to be indicating that WebShhere 7.0 (again , I have >> to say) provides a different XML parser with their product, and as such >> the default one for Castor (Xerces, as included with the JRE/JDK) cannot >> be found. >> >> You could activate one of the other XML serializers, and see whether you >> are more lucky. If that doe snot help, either, we could add a new one >> (should this really, really be required). >> >> Have a look at the castor.xml.properties file (as shipped with Castor >> XML), and at the 'org.exolab.castor.xml.serializer.factory' property in >> particular: >> >> # 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, using the Xerces >> # instance as shipped with the JRE. >> # >> # Even when using Castor XML with Java 5.0 and above, you may still want >> # to switch to the XercesXMLSerializerFactory, which will use a stand-alone >> # Xerces instance you will have to downloaded manually. >> # >> # Possible values: >> # - org.exolab.castor.xml.XercesJDK5XMLSerializerFactory (default) >> # - org.exolab.castor.xml.XercesXMLSerializerFactory >> # >> # Sample: >> # To switch to an externally supplied version of Xerces, set the property >> # as follows: >> # <pre> >> # >> >> org.exolab.castor.xml.serializer.factory=org.exolab.castor.xml.XercesXMLSerializerFactory >> # </pre> >> >> org.exolab.castor.xml.serializer.factory=org.exolab.castor.xml.XercesJDK5XMLSerializerFactory >> >> Simply override this property in a castor.properties file, and see >> whether any of the given factories does resolve your problem. >> >> Regards >> Werner >> >> Daniel Nilsson wrote: >>> Hi! >>> I am trying to use castor-xml (1.3) in Websphere 7.0 >>> When I try to mashal an object I get the following exception >>> >>> >>> Caused by: java.lang.RuntimeException: Could not instantiate serializer >>> com.sun.org.apache.xml.internal.serialize.XMLSerializer: >>> java.lang.ClassNotFoundException: >>> com.sun.org.apache.xml.internal.serialize.XMLSerializer >>> at >>> >> org.exolab.castor.xml.XercesJDK5Serializer.<init>(XercesJDK5Serializer.java:58) >>> at >>> >> org.exolab.castor.xml.XercesJDK5XMLSerializerFactory.getSerializer(XercesJDK5XMLSerializerFactory.java:34) >>> at >>> >> org.exolab.castor.xml.util.XMLParserUtils.getSerializer(XMLParserUtils.java:224) >>> at >>> >> org.castor.xml.AbstractInternalContext.getSerializer(AbstractInternalContext.java:363) >>> at >>> org.exolab.castor.xml.Marshaller.configureSerializer(Marshaller.java:389) >>> at >> org.exolab.castor.xml.Marshaller.setWriter(Marshaller.java:383) >>> at org.exolab.castor.xml.Marshaller.<init>(Marshaller.java:368) >>> at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:803) >>> >>> >>> Could anyone please help me out what i am doing wrong? >>> >>> I found the follwing issue in jira >>> http://jira.codehaus.org/browse/CASTOR-2411 which seems to discuss the >>> problem, but I can't understand how to get around the problem. >>> >>> regards >>> Daniel >>> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

