You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Niklas Gustavsson (JIRA)" <ji...@codehaus.org> on 2007/03/01 19:37:44 UTC

[jira] Created: (SUREFIRE-300) NPE in SurefirePlugin.constructSurefireBooter()

NPE in SurefirePlugin.constructSurefireBooter()
-----------------------------------------------

                 Key: SUREFIRE-300
                 URL: http://jira.codehaus.org/browse/SUREFIRE-300
             Project: Maven Surefire
          Issue Type: Bug
          Components: JUnit 3.x support
    Affects Versions: 2.3
            Reporter: Niklas Gustavsson
         Attachments: npe.log

SurefirePlugin.constructSurefireBooter() throws NPE when no testcases are present in the project. The log attached is from building FtpServer admin-gui using the 2.3 version of maven-surefire-plugin:
http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/admin-gui/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-300) NPE in SurefirePlugin.constructSurefireBooter()

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_92738 ] 

Brett Porter commented on SUREFIRE-300:
---------------------------------------

Already fixed NPE in 2.3.1-SNAPSHOT. However, it now gives a lass def not found, instead of 2.2's "no java test frameworks found". Review.


> NPE in SurefirePlugin.constructSurefireBooter()
> -----------------------------------------------
>
>                 Key: SUREFIRE-300
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-300
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Niklas Gustavsson
>            Assignee: Brett Porter
>             Fix For: 2.3.1
>
>         Attachments: maven-npe.log, npe.log
>
>
> SurefirePlugin.constructSurefireBooter() throws NPE when no testcases are present in the project. The log attached is from building FtpServer admin-gui using the 2.3 version of maven-surefire-plugin:
> http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/admin-gui/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-300) NPE in SurefirePlugin.constructSurefireBooter()

Posted by "Brad Szabo (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_90170 ] 

Brad Szabo commented on SUREFIRE-300:
-------------------------------------

This appears to happen if you do not have a dependency on junit declared in your project.

> NPE in SurefirePlugin.constructSurefireBooter()
> -----------------------------------------------
>
>                 Key: SUREFIRE-300
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-300
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Niklas Gustavsson
>         Assigned To: Jason van Zyl
>             Fix For: 2.3.1
>
>         Attachments: npe.log
>
>
> SurefirePlugin.constructSurefireBooter() throws NPE when no testcases are present in the project. The log attached is from building FtpServer admin-gui using the 2.3 version of maven-surefire-plugin:
> http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/admin-gui/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-300) NPE in SurefirePlugin.constructSurefireBooter()

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_96920 ] 

Brett Porter commented on SUREFIRE-300:
---------------------------------------

this was already fixed - the no class def found exception I saw earlier was a lack of cleaning - it correctly fails on compilation otherwise

> NPE in SurefirePlugin.constructSurefireBooter()
> -----------------------------------------------
>
>                 Key: SUREFIRE-300
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-300
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Niklas Gustavsson
>            Assignee: Brett Porter
>             Fix For: 2.3.1
>
>         Attachments: maven-npe.log, npe.log
>
>
> SurefirePlugin.constructSurefireBooter() throws NPE when no testcases are present in the project. The log attached is from building FtpServer admin-gui using the 2.3 version of maven-surefire-plugin:
> http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/admin-gui/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SUREFIRE-300) NPE in SurefirePlugin.constructSurefireBooter()

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated SUREFIRE-300:
-----------------------------------

    Fix Version/s: 2.3.1
      Component/s:     (was: JUnit 3.x support)

> NPE in SurefirePlugin.constructSurefireBooter()
> -----------------------------------------------
>
>                 Key: SUREFIRE-300
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-300
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Niklas Gustavsson
>         Assigned To: Jason van Zyl
>             Fix For: 2.3.1
>
>         Attachments: npe.log
>
>
> SurefirePlugin.constructSurefireBooter() throws NPE when no testcases are present in the project. The log attached is from building FtpServer admin-gui using the 2.3 version of maven-surefire-plugin:
> http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/admin-gui/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-300) NPE in SurefirePlugin.constructSurefireBooter()

Posted by "Stefano Bagnara (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_95003 ] 

Stefano Bagnara commented on SUREFIRE-300:
------------------------------------------

Ignore my last comment: the real issue is http://jira.codehaus.org/browse/MRRESOURCES-6
The remote resource plugin is copying a NOTICE and LICENSE file in the test folders even if my project does not have any test.. therefore I hit this NPE.. 

I leave to you and MRRESOURCE now, to decide wether MRRESOURCE must take care to not copy the files or SURFIRE must try to ignore NOTICE and LICENSE before returning this error.

> NPE in SurefirePlugin.constructSurefireBooter()
> -----------------------------------------------
>
>                 Key: SUREFIRE-300
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-300
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Niklas Gustavsson
>            Assignee: Brett Porter
>             Fix For: 2.3.1
>
>         Attachments: maven-npe.log, npe.log
>
>
> SurefirePlugin.constructSurefireBooter() throws NPE when no testcases are present in the project. The log attached is from building FtpServer admin-gui using the 2.3 version of maven-surefire-plugin:
> http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/admin-gui/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-300) NPE in SurefirePlugin.constructSurefireBooter()

Posted by "Stefano Bagnara (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_94999 ] 

Stefano Bagnara commented on SUREFIRE-300:
------------------------------------------

Is there a workaround for this? Any parameter or configuration we can add to the pom to avoid the NPE?
{code}
[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:272)
        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] ------------------------------------------------------------------------
{code}

> NPE in SurefirePlugin.constructSurefireBooter()
> -----------------------------------------------
>
>                 Key: SUREFIRE-300
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-300
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Niklas Gustavsson
>            Assignee: Brett Porter
>             Fix For: 2.3.1
>
>         Attachments: maven-npe.log, npe.log
>
>
> SurefirePlugin.constructSurefireBooter() throws NPE when no testcases are present in the project. The log attached is from building FtpServer admin-gui using the 2.3 version of maven-surefire-plugin:
> http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/admin-gui/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-300) NPE in SurefirePlugin.constructSurefireBooter()

Posted by "Brad Szabo (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_90178 ] 

Brad Szabo commented on SUREFIRE-300:
-------------------------------------

I should clarify, this NPE occurs if you do not have a dependency on either 'junit' or 'testng' declared in your project.

> NPE in SurefirePlugin.constructSurefireBooter()
> -----------------------------------------------
>
>                 Key: SUREFIRE-300
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-300
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Niklas Gustavsson
>         Assigned To: Jason van Zyl
>             Fix For: 2.3.1
>
>         Attachments: npe.log
>
>
> SurefirePlugin.constructSurefireBooter() throws NPE when no testcases are present in the project. The log attached is from building FtpServer admin-gui using the 2.3 version of maven-surefire-plugin:
> http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/admin-gui/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-300) NPE in SurefirePlugin.constructSurefireBooter()

Posted by "Dmitri Colebatch (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_90651 ] 

Dmitri Colebatch commented on SUREFIRE-300:
-------------------------------------------

I've hit this as well (log attached) and can replicate it easily.  It seems to happen when I've first compiled/run tests using maven at the command line, and then compiled in my IDE (IntelliJ).  The following steps spell this out in detail:

1. mvn clean test (works ok)
2. change a class in intellij
3. compile in intellij
4. mvn test (NPE)
5. mvn clean test (works  ok)

I'll attach my log file.

> NPE in SurefirePlugin.constructSurefireBooter()
> -----------------------------------------------
>
>                 Key: SUREFIRE-300
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-300
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Niklas Gustavsson
>         Assigned To: Jason van Zyl
>             Fix For: 2.3.1
>
>         Attachments: npe.log
>
>
> SurefirePlugin.constructSurefireBooter() throws NPE when no testcases are present in the project. The log attached is from building FtpServer admin-gui using the 2.3 version of maven-surefire-plugin:
> http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/admin-gui/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SUREFIRE-300) NPE in SurefirePlugin.constructSurefireBooter()

Posted by "Dmitri Colebatch (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitri Colebatch updated SUREFIRE-300:
--------------------------------------

    Attachment: maven-npe.log

Output of "mvn test" after compiling classes in IntelliJ.

> NPE in SurefirePlugin.constructSurefireBooter()
> -----------------------------------------------
>
>                 Key: SUREFIRE-300
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-300
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Niklas Gustavsson
>         Assigned To: Jason van Zyl
>             Fix For: 2.3.1
>
>         Attachments: maven-npe.log, npe.log
>
>
> SurefirePlugin.constructSurefireBooter() throws NPE when no testcases are present in the project. The log attached is from building FtpServer admin-gui using the 2.3 version of maven-surefire-plugin:
> http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/admin-gui/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (SUREFIRE-300) NPE in SurefirePlugin.constructSurefireBooter()

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter closed SUREFIRE-300.
---------------------------------

    Resolution: Fixed

> NPE in SurefirePlugin.constructSurefireBooter()
> -----------------------------------------------
>
>                 Key: SUREFIRE-300
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-300
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Niklas Gustavsson
>            Assignee: Brett Porter
>             Fix For: 2.3.1
>
>         Attachments: maven-npe.log, npe.log
>
>
> SurefirePlugin.constructSurefireBooter() throws NPE when no testcases are present in the project. The log attached is from building FtpServer admin-gui using the 2.3 version of maven-surefire-plugin:
> http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/admin-gui/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira