Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7851

NullPointerException in cxf-java2ws-plugin with more than one attachWsdl=true

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.16, 3.2.5, 3.2.6
    • Fix Version/s: 3.1.17, 3.2.7
    • Component/s: Tooling
    • Labels:
      None
    • Environment:

      Maven 3.5.2, JDK 1.8.0

    • Estimated Complexity:
      Unknown

      Description

      Building a project with cxf-java2ws-plugin failed with NullPointerException when more than one execution is configured with attachWsdl=true. 

      Caused by: java.lang.NullPointerException
      at org.apache.cxf.maven_plugin.Java2WSMojo.processJavaClass (Java2WSMojo.java:471)
      at org.apache.cxf.maven_plugin.Java2WSMojo.execute (Java2WSMojo.java:254)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:498)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

       

      The configuration works fine in Version 3.1.15 and 3.2.4:

      <executions>
      <execution>
      <id>wsdl-Facade1</id>
      <phase>process-classes</phase>
      <configuration>
      <className>SoapFacade1Bean</className>
      <genWsdl>true</genWsdl>
      <verbose>true</verbose>
      <outputFile>${project.build.directory}/generated-sources/wsdl/Facade1WebService.wsdl</outputFile>
      <attachWsdl>true</attachWsdl>
      </configuration>
      <goals>
      <goal>java2ws</goal>
      </goals>
      </execution>
      <execution>
      <id>wsdl-Facade2</id>
      <phase>process-classes</phase>
      <configuration>
      <className>P8ImportSoapFacade2Bean</className>
      <genWsdl>true</genWsdl>
      <verbose>true</verbose>
      <outputFile>${project.build.directory}/generated-sources/wsdl/Facade2WebService.wsdl</outputFile>
      <attachWsdl>true</attachWsdl>
      </configuration>
      <goals>
      <goal>java2ws</goal>
      </goals>
      </execution>
      </executions>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ffang Freeman Yue Fang
                Reporter:
                hab Harry Braun
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: