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

Maven[cxf-java2wadl-plugin] when stylesheetReference are set,package ended with Nullpoint Error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.2
    • 3.1.3, 3.0.7
    • JAX-RS

    Description

      Maven[cxf-java2wadl-plugin] when stylesheetReference are set,package ended with Nullpoint error.
      REASON
      org.apache.cxf.maven_plugin.javatowadl.Java2WADLMojo
      Line 211 StringBuilder sbMain = wadlGenerator.generateWADL(getBaseURI(), classResourceInfos, useJson, null, null);
      -----------------------------------------------------------------------
      org.apache.cxf.jaxrs.model.wadl.WadlGenerator
      Line 262 sbMain.append("<?xml-stylesheet " + getStylesheetInstructionData(m, ui) + "?>");
      -----------------------------------------------------------------------
      org.apache.cxf.jaxrs.model.wadl.WadlGenerator
      Line 250 theStylesheetReference = UriBuilder.fromUri(getBaseURI(m, ui))
      -----------------------------------------------------------------------
      org.apache.cxf.jaxrs.model.wadl.WadlGenerator
      Line 343 EndpointInfo ei = m.getExchange().getEndpoint().getEndpointInfo();

      m is null
      ------------------------------------------------------------------------
      ERROR LOG
      Failed to execute goal org.apache.cxf:cxf-java2wadl-plugin:3.1.2:java2wadl (process-classes) on project api: Execution process-classes of goal org.apache.cxf:cxf-java2wadl-plugin:3.1.2:java2wadl failed. NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.cxf:cxf-java2wadl-plugin:3.1.2:java2wadl (process-classes) on project api: Execution process-classes of goal org.apache.cxf:cxf-java2wadl-plugin:3.1.2:java2wadl failed.
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      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:307)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      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)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution process-classes of goal org.apache.cxf:cxf-java2wadl-plugin:3.1.2:java2wadl failed.
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      ... 20 more
      Caused by: java.lang.NullPointerException
      at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.getBaseURI(WadlGenerator.java:343)
      at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.getStylesheetInstructionData(WadlGenerator.java:250)
      at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.generateWADL(WadlGenerator.java:262)
      at org.apache.cxf.maven_plugin.javatowadl.Java2WADLMojo.execute(Java2WADLMojo.java:211)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      ... 21 more

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            dranix dranix
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified