Yes, I'll fix that. Thanks!
On 3/8/11 2:09 AM, Alessio Soldano wrote:
Hi,
after the latest changes in jboss-modules for loading our own set of
jaxp factories, I'm seeing some regressions in the jbossws-cxf testsuite
against AS7:
java.lang.ClassCastException: __redirected.__TransformerFactory cannot
be cast to javax.xml.transform.sax.SAXTransformerFactory
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.createTransformerHandler(JAXBContextImpl.java:744)
at
com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader$State.<init>(DomLoader.java:63)
at
com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader.startElement(DomLoader.java:113)
at
com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader.startElement(ProxyLoader.java:55)
at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:481)
at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:459)
at
com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:71)
at
com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:148)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:239)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:276)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:245)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:276)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:245)
at com.sun.xml.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:122)
at com.sun.xml.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:105)
at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:317)
at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:297)
at
org.apache.cxf.jaxws.spi.ProviderImpl.createW3CEndpointReference(ProviderImpl.java:311)
... 19 more
basically the JAXB impl expects the configured TransformerFactory to be
an instance of SAXTransformerFactory:
public static TransformerHandler createTransformerHandler() {
try {
synchronized(JAXBContextImpl.class) {
if(tf==null)
tf =
(SAXTransformerFactory)TransformerFactory.newInstance();
return tf.newTransformerHandler();
}
} catch (TransformerConfigurationException e) {
throw new Error(e); // impossible
}
}
Jason, what do we want to do? Implement SAXTransformerFactory too in
jboss-modules' __TransformerFactory ?
Cheers
Alessio
--
Jason T. Greene
JBoss, a division of Red Hat