Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-4175

Port TOMEE-3779 to 10.x

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 10.0.0-M1
    • TomEE Maven Plugin
    • None

    Description

      When trying to run an specific webapp, which I unfortunately cannot provide, it fails with this NPE:

      [ERROR] Failed to execute goal org.apache.tomee.maven:tomee-embedded-maven-plugin:8.0.7:run (default-cli) on project oup-base-plugin: Execution default-cli of goal org.apache.tomee.maven:tomee-embedded-maven-plugin:8.0.7:run failed. NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.tomee.maven:tomee-embedded-maven-plugin:8.0.7:run (default-cli) on project oup-base-plugin: Execution default-cli of goal org.apache.tomee.maven:tomee-embedded-maven-plugin:8.0.7:run failed.
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
      	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:56)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.apache.tomee.maven:tomee-embedded-maven-plugin:8.0.7:run failed.
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:148)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
      	... 20 more
      Caused by: java.lang.NullPointerException
      	at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
      	at java.base/java.util.concurrent.ConcurrentHashMap.putAll(ConcurrentHashMap.java:1089)
      	at java.base/java.util.Properties.putAll(Properties.java:1350)
      	at org.apache.openejb.maven.plugins.TomEEEmbeddedMojo.getConfig(TomEEEmbeddedMojo.java:696)
      	at org.apache.openejb.maven.plugins.TomEEEmbeddedMojo.execute(TomEEEmbeddedMojo.java:411)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
      	... 21 more}
      

       

      The affected line, https://github.com/apache/tomee/blob/master/maven/tomee-embedded-maven-plugin/src/main/java/org/apache/openejb/maven/plugins/TomEEEmbeddedMojo.java#L696, indicates we should drop or skip the properties with null values before adding containerProperties to properties.

       

      Thanks in advance.

      Attachments

        Issue Links

          Activity

            People

              rzo1 Richard Zowalla
              thiagohp Thiago Henrique De Paula Figueiredo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: