Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven org.apache.xerces.impl.dv.DVFactoryException

Tags:

maven-2

I have Maven project with two sub-modules , each module has dependency with xerces2.8.1(for wsdl2java with cxf) . If i build the sub-modules seperately it builds successfully.

If i build from root module , while building the second sub-module it fails with below exception

[INFO] org.apache.xerces.impl.dv.DVFactoryException: DTD factory class org.apach
e.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.

Anybody has come across this before?

Thanks Vijay

like image 646
user684434 Avatar asked Apr 29 '11 14:04

user684434


1 Answers

You need to add the following to the plugin configuration:

<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-codegen-plugin</artifactId>
    <version>${cxf.version}</version>
    <dependencies>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.8.1</version>
        </dependency>
    </dependencies>
    ...
</plugin>

After that it should work.

like image 138
Ruggs Avatar answered Nov 13 '22 13:11

Ruggs