2 Replies Latest reply on Dec 8, 2009 2:34 PM by Paul Gier

    NPE in maven-buildmagic-thirdparty-plugin

    jaikiran pai Master

      On multiple occasions while build JBPAPP_5_0 branch, i have run into a NPE like this:

      [java] [INFO] ------------------------------------------------------------------------
       [java] [ERROR] FATAL ERROR
       [java] [INFO] ------------------------------------------------------------------------
       [java] [INFO] null
       [java] [INFO] ------------------------------------------------------------------------
       [java] [INFO] Trace
       [java] java.lang.NullPointerException
       [java] at org.jboss.maven.plugins.thirdparty.Dependency.equals(Dependency.java:104)
       [java] at java.util.HashMap.put(HashMap.java:422)
       [java] at java.util.HashSet.add(HashSet.java:194)
       [java] at org.codehaus.plexus.component.configurator.converters.composite.CollectionConverter.fromConfiguration(CollectionConverter.java:181)
       [java] at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247)
       [java] at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137)
       [java] at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
       [java] at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1282)
       [java] at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:661)
       [java] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:429)
       [java] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
       [java] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
       [java] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
       [java] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
       [java] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
       [java] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
       [java] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
       [java] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
       [java] at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       [java] at java.lang.reflect.Method.invoke(Method.java:585)
       [java] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
       [java] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
       [java] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
       [java] at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
       [java] [INFO] ------------------------------------------------------------------------
       [java] [INFO] Total time: 1 minute 39 seconds
       [java] [INFO] Finished at: Thu Dec 03 19:58:42 IST 2009
       [java] [INFO] Final Memory: 36M/93M
       [java] [INFO] ------------------------------------------------------------------------
       [java] Java Result: 1


      I have seen this happening on the JBPAPP_5_0 branch only around 3-4 times. The only way i got past this was by deleting my "thirdparty" directory and letting it be recreated again.

      I tried getting more informative logs, but i could only get this much. The -X option to maven did not generate anything more informative. Let me know if anything more is needed.