4

The same pom.xml is working with maven-jaxb2-plugin v0.11 but not with v0.12.

        <plugin>
            <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb2-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <extension>true</extension>
                <schemaDirectory>${basedir}/src/wsdl</schemaDirectory>
                <schemaIncludes>
                    <schemaInclude>*.wsdl</schemaInclude>
                </schemaIncludes>
                <bindingDirectory>${basedir}/src/jaxws/</bindingDirectory>
                <generateDirectory>${basedir}/target/jaxws/java</generateDirectory>
                <strict>false</strict>                  
                <verbose>true</verbose>
                <forceRegenerate>true</forceRegenerate>
                <args>
                    <arg>-Xfluent-api</arg>
                </args>
                <plugins>
                    <plugin>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-fluent-api</artifactId>
                        <version>3.0</version>
                    </plugin>
                </plugins>
            </configuration>
        </plugin>

The reason is because after the fix#23 null is returned rather than "systemId" in the MavenCatalogResolver.java (line:64)

Caused by: java.lang.NullPointerException
    at java.net.URI$Parser.parse(URI.java:3003)
    at java.net.URI.<init>(URI.java:578)
    at org.jvnet.jaxb2.maven2.resolver.tools.MavenCatalogResolver.getResolvedEntity(MavenCatalogResolver.java:64) at com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver.resolveEntity(CatalogResolver.java:192)

What would be the right configuration for my pom.xml in order to make it work?

nicolas
  • 385
  • 1
  • 2
  • 12

1 Answers1

4

Disclaimer: I am the author of the maven-jaxb2-plugin.

Please file an issue here ans send me a sample project to reproduce (the best would be a pull request to tests.

I'll be fixing this ASAP.

I wonder how a passed systemId can be null but it's a bug anyway. Will be fixed ASAP, I just need a test project to reproduce.

Update.

The 0.12.2 release fixes the NPE you're reporting. However, I'm not sure that it fixes your build. It may well be that you have a different problem. I wonder how systemId can be null.

Please send me the reproducing project for further tests.

Generally it would be better for file bugs and issues on GitHub rather than posting on SO.

lexicore
  • 42,748
  • 17
  • 132
  • 221
  • Thank you for the prompt reply, unfortunately i cannot share this project and i have no time now to create a sample project, as i am new to this, and my knowledge is limited. If i have some time in the near future i will try and send you a test that reproduces the issue. For now i have reverted back to 0.11.0. Thanks – nicolas Dec 16 '14 at 09:29
  • @nicolas Try upgrading to 0.12.2. – lexicore Dec 16 '14 at 10:39