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

cxf-java2ws-plugin plugin running on non-modular JDK fails with NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.14, 3.3.13, 3.4.6, 3.5.1
    • 3.5.3, 3.4.8, 4.0.0
    • JAX-RS
    • None
    • JDK 8

    • Unknown

    Description

      additionalJvmArgs is assumed to be non-null when fork=true, but that is not the case when running on a non-modular JDK and not specifying explicitly a non-empty value for additionalJvmArgs in the configuration XML.

      In the case were requiresModules=true a null value is changed to an empty string, but if requiresModules is false the null value remains.

              if (fork) {
                  String[] split = additionalJvmArgs.split("\\s+");
      

      Caused by: java.lang.NullPointerException
      at org.apache.cxf.maven_plugin.Java2WSMojo.initArgs (Java2WSMojo.java:296)

      Work-around is to specify a non-empty value for <additionalJvmArgs> , e.g. <additionalJvmArgs>-Dworkaroundnpe</additionalJvmArgs>

      Attachments

        Issue Links

          Activity

            People

              reta Andriy Redko
              swpalmer Scott Palmer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: