ClassCastException when moving from 2.5 to 3.0 ----------------------------------------------
Key: MPCHECKSTYLE-53 URL: http://jira.codehaus.org/browse/MPCHECKSTYLE-53 Project: maven-checkstyle-plugin Type: Bug Versions: 3.0 Environment: Windows/Linux Java 5.0 Maven 1.x Reporter: Bernard Durfee The error I get... BUILD FAILED File...... /home/cruisecontrol/.maven/cache/maven-checkstyle-plugin-3.0/plugin.jelly Element... style Line...... 238 Column.... 59 java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser ...is usually caused when an application is specifically looking for Xerces classes, instead of always going through JAXP interfaces and factories. My application uses XSLT 2.0 features, which are not supported by Xerces/Xalan. So I have a file in my JDK lib directory named "jaxp.properties"... {code} # JAXP Factories javax.xml.parsers.SAXParserFactory = oracle.xml.jaxp.JXSAXParserFactory javax.xml.parsers.DocumentBuilderFactory = oracle.xml.jaxp.JXDocumentBuilderFactory javax.xml.transform.TransformerFactory = oracle.xml.jaxp.JXSAXTransformerFactory {code} ...which causes the JDK to default to the Oracle parser, which supports XSLT 2.0. My hunch is that somewhere in the code the JAXP TransformerFactory is called, which returns the Oracle object, but someone is assuming that the Xerces object will be returned and are casting the object to get at some Xerces specific feature. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]