Problem using doxia 1.1.1 xdoc parser in a report plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem using doxia 1.1.1 xdoc parser in a report plugin

David Meibusch
Hello,
I'm struggling with parsing xdoc with Doxia 1.1.1 in a Maven report
plugin.

The parse call throws a ClassNotFoundException:

...
[INFO] Caused by: org.apache.maven.doxia.parser.ParseException: Error
validating the model: SAX2 driver class
org.apache.xerces.parsers.SAXParser not found
[INFO]  at
org.apache.maven.doxia.parser.AbstractXmlParser.validate(AbstractXmlPars
er.java:661)
[INFO]  at
org.apache.maven.doxia.parser.AbstractXmlParser.parse(AbstractXmlParser.
java:142)
[INFO]  at
org.apache.maven.doxia.parser.XhtmlBaseParser.parse(XhtmlBaseParser.java
:88)
[INFO]  at
org.apache.maven.doxia.module.xdoc.XdocParser.parse(XdocParser.java:96)
[INFO]  at
org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:63)
[INFO]  at
com.intecbilling.maven.plugins.remedy.ReleaseNotesReport.executeReport(R
eleaseNotesReport.java:342)
[INFO]  ... 26 more
[INFO] Caused by: java.lang.ClassNotFoundException:
org.apache.xerces.parsers.SAXParser
[INFO]  at
org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:189
)
[INFO]  at
org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.ja
va:180)
[INFO]  at
org.apache.maven.doxia.parser.AbstractXmlParser.getXmlReader(AbstractXml
Parser.java:677)
[INFO]  at
org.apache.maven.doxia.parser.AbstractXmlParser.validate(AbstractXmlPars
er.java:644)
[INFO]  ... 31 more

An outline of the report plugin:

    /**
     * Doxia Component.
     *
     * @component
     * @readonly
     * @required
     */
    private Doxia doxia;
...

   protected void executeReport(Locale locale) throws
MavenReportException {
...
        doxia.parse(reader,"xdoc", getSink());


The reader is valid - it is reading a generated xdoc file.
I'd assumed classloader issues, and tried all variations of including
the Xerces impl in the dependencies, but with no luck.

Maven v2.2.1.

Plugin dependencies:

    <properties>
       <maven-version>2.2.1</maven-version>
       <doxia-version>1.1.1</doxia-version>
    </properties>

    <dependencies>
        <!-- Maven dependencies -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${maven-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>${maven-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-profile</artifactId>
            <version>${maven-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-settings</artifactId>
            <version>${maven-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.reporting</groupId>
            <artifactId>maven-reporting-api</artifactId>
            <version>${maven-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${maven-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-filtering</artifactId>
            <version>1.0-beta-3</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>1.5.15</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-interpolation</artifactId>
            <version>1.13</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-core</artifactId>
            <version>${doxia-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-sink-api</artifactId>
            <version>${doxia-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-decoration-model</artifactId>
            <version>${doxia-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-site-renderer</artifactId>
            <version>${doxia-version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-container-default</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-component-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-module-xdoc</artifactId>
            <version>${doxia-version}</version>
        </dependency>

        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.8.1</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>woodstox-core-asl</artifactId>
            <version>4.0.5</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
            <version>1.0-alpha-9-stable-1</version>
        </dependency>

    </dependencies>

Regards,
Dave Meibusch
 
This e-mail and any attachments are confidential and may also be legally privileged and/or copyright material of Intec Telecom Systems PLC (or its affiliated companies). If you are not an intended or authorised recipient of this e-mail or have received it in error, please delete it immediately and notify the sender by e-mail. In such a case, reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Intec Telecom Systems PLC does not represent or warrant that an attachment hereto is free from computer viruses or other defects. The opinions expressed in this e-mail and any attachments may be those of the author and are not necessarily those of Intec Telecom Systems PLC.