1 Reply Latest reply on Dec 17, 2007 12:24 AM by pgier

    NPE unless clean done first

    starksm64

      I was seeing this error until I did a clean of the mc project:

      [INFO] Installing /home/svn/JBossMC/jbossmc/deployers-structure-spi/target/jboss-deployers-structure-spi-tests.jar to /home/svn/repository.jboss.com/maven2/org/jboss/microcontainer/jboss-deployers-structure-spi/2.0.0-SNAPSHOT/jboss-deployers-structure-spi-2.0.0-SNAPSHOT-tests.jar
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building JBoss Deployers SPI
      [INFO] task-segment: [install]
      [INFO] ----------------------------------------------------------------------------
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:compile]
      [INFO] Nothing to compile - all classes are up to date
      [INFO] [resources:testResources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:testCompile]
      [INFO] Nothing to compile - all classes are up to date
      [INFO] [surefire:test]
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] null
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.NullPointerException
       at org.apache.maven.plugin.surefire.SurefirePlugin.constructSurefireBooter(SurefirePlugin.java:594)
       at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:391)
       at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
       at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1 minute 11 seconds
      [INFO] Finished at: Sat Dec 15 08:18:37 PST 2007
      [INFO] Final Memory: 33M/330M
      [INFO] ------------------------------------------------------------------------
      


      Don't know why the project gets into such a state.


        • 1. Re: NPE unless clean done first
          pgier

          Usually the only time I see things like this is if I do an svn update and then a mvn install without cleaning. I'm guessing some of the classes that should be recompiled are not, and a clean usually fixes it. Maybe there is a bug in the compiler plugin that does not correctly determine out of date classes.

          In your case, maybe one of the tests was removed or renamed? And now surefire can't find something it's looking for? That's all I can think of that could cause an error like that.