davidmoten / jax-maven-plugin

maven plugin support for xjc, wsimport, wsgen, schemagen for Java 8,9,10,11+
Apache License 2.0
34 stars 12 forks source link

ZeroOneBooleanAdapter Not Found #18

Open MaToxZ opened 3 years ago

MaToxZ commented 3 years ago

Hello @davidmoten ,

I'm trying to run your plugin with the wsimport goal, my plugin definition is the following:

`<plugin>
                <groupId>com.github.davidmoten</groupId>
                <artifactId>jax-maven-plugin</artifactId>
                <version>0.1.8</version>
                <dependencies>
                    <dependency>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-basics</artifactId>
                        <version>${jaxb2.basics.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>wsimport</id>
                        <!-- generate sources from the java.util.logging
                            DTD -->
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>wsimport</goal>
                        </goals>
                        <configuration>
                            <arguments>
                                <!-- These are the arguments you would normally
                                    have put with a call to wsimport -->
                                <argument>-verbose</argument>
                                <argument>-keep</argument>
                                <argument>-d</argument>
                                <argument>${jaxws.generated.classes}</argument>
                                <argument>-s</argument>
                                <argument>${jaxws.generated.sources}</argument>
                                <argument>${project.basedir}/src/main/resources/myWsdlFile.wsdl</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>`

But I'm getting errors that are forcing the plugin to ends up in errors.

Exception in thread "main" java.lang.InternalError: Unable to load source code of com.sun.tools.xjc.runtime.ZeroOneBooleanAdapter as a resource
    at com.sun.codemodel.fmt.JStaticJavaFile$ResourceLoader.getResourceAsStream(JStaticJavaFile.java:234)
    at com.sun.codemodel.fmt.JStaticJavaFile.build(JStaticJavaFile.java:84)
    at com.sun.codemodel.JPackage.build(JPackage.java:446)
    at com.sun.codemodel.JCodeModel.build(JCodeModel.java:327)
    at com.sun.codemodel.JCodeModel.build(JCodeModel.java:317)
    at com.sun.tools.ws.wscompile.WsimportTool.generateCode(WsimportTool.java:477)
    at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:179)
    at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:153)
    at com.sun.tools.ws.WsImport.doMain(WsImport.java:43)
    at com.github.davidmoten.jaxws.WsImportMain.main(WsImportMain.java:8)

By any chance do you know how to solve this?

JDK: corretto-11.0.10 Spring Boot: 2.4.1

I'd really appreciate your guidence how to solve this, I'm currently stuck. Thank you so much in advance.

davidmoten commented 3 years ago

Hmm. Can you see if jax-maven-plugin the project builds with that JDK?

git clone https://github.com/davidmoten/jax-maven-plugin.git
cd jax-maven-plugin
mvn clean install
davidmoten commented 3 years ago

I see this: https://github.com/eclipse-ee4j/jaxb-ri/issues/1287 which has been fixed. Looks like we need to upgrade the jax libraries.

davidmoten commented 3 years ago

Might be time to upgrade to jakarta libs entirely. We'll see.