Reputation: 143
I am trying to install a web-app using maven. I see this error that reads:
Failed to execute goal org.apache.cxf:cxf-codegen-plugin:3.0.13:wsdl2java (generate-sources) on project -simple-webapp: Execution generate-sources of goal org.apache.cxf:cxf-codegen-plugin:3.0.13:wsdl2java failed: java.lang.IllegalStateException: You are running with invalid JAXP api or implementation. JAXP api/implementation of version 1.3.1 (included in JDK6) or higher is required. In case you are using ant, make sure ant 1.7.0 or higher is used - older versions of ant contain JAXP api/impl version 1.2 (in xml-apis.jar). If you want to keep using older ant versions, you have to configure it to use higher the JAXP api/impl versions. javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V -> [Help 1]
The weird part is that I have specified the dependency on jaxp in my pom.xml:
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxp-api</artifactId>
<version>1.4</version>
</dependency>
And this is correctly downloaded. I can see that in my .m2 repository. But some how it can still not find.
Any suggestions on how to fix this issue?
Upvotes: 1
Views: 6744
Reputation: 84
I solved this issue by using the following code. I am using JDK8 in my project
System.setProperty("javax.xml.transform.TransformerFactory", "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
Upvotes: 0