Kevin L.
Kevin L.

Reputation: 1

cxf-codegen-plugin illegal configuration-file syntax

I am trying to update some web services code developed for Java 6 to Java 8. The modules use the maven cxf-codegen-plugin. The Java 6 version used cxf version 2.2.2. I was able to get it working with Java 7 by updating cxf to 2.7.9 but haven't be able to build under Java 8. I tried updating cxf to 3.0.3 but still get this error:

XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sum.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: java.xml.xpath.XPathFactory: jar:file:/c:/Documents%20and%20Settings/Kevin/.m2/repository/saxon/saxon-xpath/8.9.0.3/saxon-xpath-8.9.0.3.jar!META-INF/services/javax.xml.xpath.XPathFactory:2: Illegal configuration-file syntax

I am using jdk 1.8.0_31, maven 3.0.3 and cxf 3.0.3.

Upvotes: 0

Views: 1234

Answers (1)

Michael Wyraz
Michael Wyraz

Reputation: 3818

The problem comes from an incompatible version of saxon-he. It can easily be solved by adding a fixed version to the classpath oth the maven plugin (as dependency):

            <plugin>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-codegen-plugin</artifactId>
            <version>${cxf-version}</version>
            <dependencies>
                <dependency>
                    <groupId>org.daisy.libs</groupId>
                    <artifactId>saxon-he</artifactId>
                    <version>9.5.1.5</version>
                </dependency>
            </dependencies>
            <executions>

Upvotes: 2

Related Questions