XJC generation error : can't parse argument number

3.3k views Asked by At

I have the following error when trying to generate classes from my wsdl:

Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate (CreateWebServiceAccountV1) on project hblws.test: Execution CreateWebServiceAccountV1 of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate failed: can't parse argument number: ''http://java.sun.com/xml/ns/jaxb'': For input string: "''http://java.sun.com/xml/ns/jaxb''" -> [Help 1]

I have one wsdl file and multiple XSD/XJB. XJB have following namespace : xmlns="http://java.sun.com/xml/ns/jaxb"

Here is the code of pom.xml that execute the JAXB/XJC generation :

<plugin>
            <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb2-plugin</artifactId>
            <version>0.12.3</version>
            <executions>
                <!-- CreateWebServiceAccount V1 -->
                <execution>
                    <id>CreateWebServiceAccountV1</id>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <sourceDestDir>
                            ${project.build.directory}/generated-sources
                        </sourceDestDir>
                        <wsdlFiles>
                            <wsdlFile>CreateWebServiceAccountV1.wsdl</wsdlFile>
                        </wsdlFiles>
                        <wsdlDirectory>${basedir}/src/main/webapp/WEB-INF/wsdl/</wsdlDirectory>
                        <verbose>true</verbose>
                        <bindingFiles>
                            <bindingFile>${basedir}/src/main/webapp/META-INF/wsdl/CreateWebServiceAccountV1.xjb</bindingFile>
                            <bindingFile>${basedir}/src/main/webapp/META-INF/wsdl/CreateWebServiceAccountV1Model.xjb</bindingFile>
                            <bindingFile>${basedir}/src/main/webapp/META-INF/wsdl/SystemFault-v1.xjb</bindingFile>
                        </bindingFiles>
                        <staleFile>${project.build.directory}/jaxws/stale/wsdl.CreateWebServiceAccountV1.done</staleFile>
                        <schemaDirectory>${basedir}/src/main/webapp/META-INF/wsdl/</schemaDirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>

Thanks in advance for your help !

1

There are 1 answers

0
Samt On BEST ANSWER

This is a bug of JDK,see JDK-8204933.

Solution, change locale to en, the others will fail:

<configuration>
   <locale>en</locale>
<configuration>

The English (and portuguese) version correctly quote , all other localizations replace this with the faulty

For me, this plugin tell me the true cause:

org.xml.sax.SAXParseException: not an external binding file. The root element must be {http://java.sun.com/xml/ns/jaxb}bindings but it is {https://java.sun.com/xml/ns/jaxb}bindings