XJC generation error : can't parse argument number
Asked Answered
M

1

6

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 !

Modestomodesty answered 17/6, 2015 at 14:45 Comment(1)
Could you solve it? If yes, can you provide a solution? I'm getting the same error.Herbarium
H
6

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

Hydropathy answered 2/11, 2021 at 6:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.