Maven Shared Components
  1. Maven Shared Components
  2. MSHARED-223

NullPointerException in maven-resources-plugin

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: maven-filtering-1.0
    • Fix Version/s: maven-filtering-1.1
    • Component/s: maven-filtering
    • Labels:
      None
    • Environment:
      centos 5.x
      maven 3.0.3
      TeamCity Enterprise Version 6.5.2 (build 17935)
      Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
      Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)
    • Number of attachments :
      0

      Description

      About twice a day we get a NullPointerException in our build:

      [06:44:23]: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project spring-lib: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed. NullPointerException -> [Help 1]
      [06:44:23]: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project spring-lib: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed.
      [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
      [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      [06:44:23]: at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      [06:44:23]: at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
      [06:44:23]: at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:164)
      [06:44:23]: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      [06:44:23]: at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      [06:44:23]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      [06:44:23]: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      [06:44:23]: at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      [06:44:23]: at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      [06:44:23]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      [06:44:23]: at java.lang.Thread.run(Thread.java:619)
      [06:44:23]: Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed.
      [06:44:23]: at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
      [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      [06:44:23]: ... 13 more
      [06:44:23]: Caused by: java.lang.NullPointerException
      [06:44:23]: at java.util.ArrayList.<init>(ArrayList.java:131)
      [06:44:23]: at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filteredFileExtension(DefaultMavenResourcesFiltering.java:115)
      [06:44:23]: at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources(DefaultMavenResourcesFiltering.java:264)
      [06:44:23]: at org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:310)
      [06:44:23]: at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      [06:44:23]: ... 14 more
      

      This comes at random times, and the next build doesn't fail.

      I've googled for this failure and found nothing. I have this gut feeling that this may be caused by a concurrency issue in the maven-resources-plugin.

      We got this error with maven-resources-plugin 2.4.3, and now with 2.5. Our maven version is 3.0.3.

      We execute the build on TeamCity with the following parameters:

      Goals: install
      Additional Maven command line parameters: -T 2C -e -P!releasex,integration 
      -Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true 
      -Dmaven.test.haltafterfailure=false -Dmaven.junit.timeout=1000000
      -DwarProject.packaging=jar
      

        Activity

        Dennis Lundberg made changes -
        Field Original Value New Value
        Description About twice a day we get a NullPointerException in our build:
        {code}
        [06:44:23]: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project spring-lib: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed. NullPointerException -> [Help 1]
        [06:44:23]: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project spring-lib: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed.
        [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
        [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        [06:44:23]: at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        [06:44:23]: at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
        [06:44:23]: at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:164)
        [06:44:23]: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        [06:44:23]: at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        [06:44:23]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        [06:44:23]: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        [06:44:23]: at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        [06:44:23]: at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        [06:44:23]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        [06:44:23]: at java.lang.Thread.run(Thread.java:619)
        [06:44:23]: Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed.
        [06:44:23]: at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
        [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        [06:44:23]: ... 13 more
        [06:44:23]: Caused by: java.lang.NullPointerException
        [06:44:23]: at java.util.ArrayList.<init>(ArrayList.java:131)
        [06:44:23]: at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filteredFileExtension(DefaultMavenResourcesFiltering.java:115)
        [06:44:23]: at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources(DefaultMavenResourcesFiltering.java:264)
        [06:44:23]: at org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:310)
        [06:44:23]: at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        [06:44:23]: ... 14 more
        {code}
        This comes at random times, and the next build doesn't fail.

        I've googled for this failure and found nothing. I have this gut feeling that this may be caused by a concurrency issue in the maven-resources-plugin.

        We got this error with maven-resources-plugin 2.4.3, and now with 2.5. Our maven version is 3.0.3.

        We execute the build on TeamCity with the following parameters:
        {code}
        Goals: install
        Additional Maven command line parameters: -T 2C -e -P!releasex,integration
        -Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true
        -Dmaven.test.haltafterfailure=false -Dmaven.junit.timeout=1000000
        -DwarProject.packaging=jar
        {code}
        About twice a day we get a NullPointerException in our build:

        {noformat}
        [06:44:23]: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project spring-lib: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed. NullPointerException -> [Help 1]
        [06:44:23]: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project spring-lib: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed.
        [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
        [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        [06:44:23]: at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        [06:44:23]: at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
        [06:44:23]: at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:164)
        [06:44:23]: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        [06:44:23]: at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        [06:44:23]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        [06:44:23]: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        [06:44:23]: at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        [06:44:23]: at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        [06:44:23]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        [06:44:23]: at java.lang.Thread.run(Thread.java:619)
        [06:44:23]: Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed.
        [06:44:23]: at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
        [06:44:23]: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        [06:44:23]: ... 13 more
        [06:44:23]: Caused by: java.lang.NullPointerException
        [06:44:23]: at java.util.ArrayList.<init>(ArrayList.java:131)
        [06:44:23]: at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filteredFileExtension(DefaultMavenResourcesFiltering.java:115)
        [06:44:23]: at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources(DefaultMavenResourcesFiltering.java:264)
        [06:44:23]: at org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:310)
        [06:44:23]: at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        [06:44:23]: ... 14 more
        {noformat}

        This comes at random times, and the next build doesn't fail.

        I've googled for this failure and found nothing. I have this gut feeling that this may be caused by a concurrency issue in the maven-resources-plugin.

        We got this error with maven-resources-plugin 2.4.3, and now with 2.5. Our maven version is 3.0.3.

        We execute the build on TeamCity with the following parameters:

        {noformat}
        Goals: install
        Additional Maven command line parameters: -T 2C -e -P!releasex,integration
        -Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true
        -Dmaven.test.haltafterfailure=false -Dmaven.junit.timeout=1000000
        -DwarProject.packaging=jar
        {noformat}
        Dennis Lundberg made changes -
        Project Maven 2.x Resources Plugin [ 11145 ] Maven Shared Components [ 11761 ]
        Key MRESOURCES-149 MSHARED-223
        Affects Version/s maven-filtering-1.0 [ 16231 ]
        Affects Version/s 2.5 [ 16232 ]
        Affects Version/s 2.4.3 [ 16471 ]
        Component/s maven-filtering [ 13380 ]
        Component/s copy [ 14618 ]
        Robert Scholte made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s maven-filtering-1.1 [ 17197 ]
        Assignee Olivier Lamy [ olamy ]
        Status Open [ 1 ] Closed [ 6 ]

          People

          • Assignee:
            Olivier Lamy
            Reporter:
            Eran Harel
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: