You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Scott Palmer (Jira)" <ji...@apache.org> on 2022/04/08 23:00:00 UTC

[jira] [Created] (CXF-8689) cxf-java2ws-plugin plugin running on non-modular JDK fails with NullPointerException

Scott Palmer created CXF-8689:
---------------------------------

             Summary: cxf-java2ws-plugin plugin running on non-modular JDK fails with NullPointerException
                 Key: CXF-8689
                 URL: https://issues.apache.org/jira/browse/CXF-8689
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 3.5.1, 3.4.6, 3.3.13, 3.2.14
         Environment: JDK 8

            Reporter: Scott Palmer


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.


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

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>




--
This message was sent by Atlassian Jira
(v8.20.1#820001)