You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Arnaud Heritier (JIRA)" <ji...@codehaus.org> on 2006/02/07 16:41:47 UTC

[jira] Commented: (MPCHECKSTYLE-53) ClassCastException when moving from 2.5 to 3.0

    [ http://jira.codehaus.org/browse/MPCHECKSTYLE-53?page=comments#action_58061 ] 

Arnaud Heritier commented on MPCHECKSTYLE-53:
---------------------------------------------

Can you give us the full stacktrace with the -e option. Thanks

> 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
>      Fix For: 3.0.1

>
>
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org