You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Vincent Massol (JIRA)" <ji...@codehaus.org> on 2005/12/21 10:51:34 UTC

[jira] Created: (MSUREFIRE-35) Improved errors in console

Improved errors in console
--------------------------

         Key: MSUREFIRE-35
         URL: http://jira.codehaus.org/browse/MSUREFIRE-35
     Project: Maven 2.x Surefire Plugin
        Type: Improvement

    Reporter: Vincent Massol
 Assigned to: Jason van Zyl 


Here's what I get:

C:\dev\cargo\trunk\samples\java>mvn clean install
[...]
[INFO] [surefire:test]
[INFO] forkMode: pertest
[INFO] Setting reports dir: C:\dev\cargo\trunk\samples\java\target/surefire-reports
java.lang.reflect.InvocationTargetException
        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:324)
        at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
        ... 5 more
Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.AllContainerTest
        at java.lang.Class.newInstance0(Class.java:293)
        at java.lang.Class.newInstance(Class.java:261)
        at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
        ... 13 more
java.lang.reflect.InvocationTargetException
        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:324)
        at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
        ... 5 more
Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.EarCapabilityContainerTest
        at java.lang.Class.newInstance0(Class.java:293)
        at java.lang.Class.newInstance(Class.java:261)
        at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
        ... 13 more
java.lang.reflect.InvocationTargetException
        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:324)
        at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
        ... 5 more
Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.tomcat.TomcatSpecificTest
        at java.lang.Class.newInstance0(Class.java:293)
        at java.lang.Class.newInstance(Class.java:261)
        at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
        ... 13 more
java.lang.reflect.InvocationTargetException
        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:324)
        at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
        ... 5 more
Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.WarAndDeployerCapabilityContainerTest
        at java.lang.Class.newInstance0(Class.java:293)
        at java.lang.Class.newInstance(Class.java:261)
        at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
        ... 13 more
java.lang.reflect.InvocationTargetException
        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:324)
        at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
        ... 5 more
Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.WarCapabilityContainerTest
        at java.lang.Class.newInstance0(Class.java:293)
        at java.lang.Class.newInstance(Class.java:261)
        at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
        ... 13 more
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] There are some test failure.
[INFO] ----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 33 seconds
[INFO] Finished at: Wed Dec 21 10:04:55 CET 2005
[INFO] Final Memory: 5M/13M
[INFO] ----------------------------------------------------------------------------

Surefire doesn't report why it cannot instantiate my test cases. It simply invocationtargetexception which deosn't say much. Isn't there a nested exception that would explain why?

(Note: I can see the problem is in instantiating the test. However surefire should *NOT* call the test's constructor. There is a suite() method defined in those tests and it's the goal of the suite to do the instantiations! I believe this is related to MSUREFIRE-20).

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MSUREFIRE-35) Improved errors in console

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSUREFIRE-35?page=all ]

Jason van Zyl updated MSUREFIRE-35:
-----------------------------------

    Fix Version: 2.1.2

> Improved errors in console
> --------------------------
>
>          Key: MSUREFIRE-35
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-35
>      Project: Maven 2.x Surefire Plugin
>         Type: Improvement

>     Reporter: Vincent Massol
>     Assignee: Jason van Zyl
>      Fix For: 2.1.2

>
>
> Here's what I get:
> C:\dev\cargo\trunk\samples\java>mvn clean install
> [...]
> [INFO] [surefire:test]
> [INFO] forkMode: pertest
> [INFO] Setting reports dir: C:\dev\cargo\trunk\samples\java\target/surefire-reports
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.AllContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.EarCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.tomcat.TomcatSpecificTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.WarAndDeployerCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.WarCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] There are some test failure.
> [INFO] ----------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: 33 seconds
> [INFO] Finished at: Wed Dec 21 10:04:55 CET 2005
> [INFO] Final Memory: 5M/13M
> [INFO] ----------------------------------------------------------------------------
> Surefire doesn't report why it cannot instantiate my test cases. It simply invocationtargetexception which deosn't say much. Isn't there a nested exception that would explain why?
> (Note: I can see the problem is in instantiating the test. However surefire should *NOT* call the test's constructor. There is a suite() method defined in those tests and it's the goal of the suite to do the instantiations! I believe this is related to MSUREFIRE-20).

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MSUREFIRE-35) Improved errors in console

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSUREFIRE-35?page=all ]
     
Brett Porter closed MSUREFIRE-35:
---------------------------------

      Assign To: Brett Porter  (was: Jason van Zyl)
     Resolution: Cannot Reproduce
    Fix Version:     (was: 2.2)

this has changed in 2.2, so probably works or reports better. Let me know.

I tried to test it myself, but the code your presented doesn't compile.

> Improved errors in console
> --------------------------
>
>          Key: MSUREFIRE-35
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-35
>      Project: Maven 2.x Surefire Plugin
>         Type: Improvement

>     Reporter: Vincent Massol
>     Assignee: Brett Porter

>
>
> Here's what I get:
> C:\dev\cargo\trunk\samples\java>mvn clean install
> [...]
> [INFO] [surefire:test]
> [INFO] forkMode: pertest
> [INFO] Setting reports dir: C:\dev\cargo\trunk\samples\java\target/surefire-reports
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.AllContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.EarCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.tomcat.TomcatSpecificTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.WarAndDeployerCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.WarCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] There are some test failure.
> [INFO] ----------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: 33 seconds
> [INFO] Finished at: Wed Dec 21 10:04:55 CET 2005
> [INFO] Final Memory: 5M/13M
> [INFO] ----------------------------------------------------------------------------
> Surefire doesn't report why it cannot instantiate my test cases. It simply invocationtargetexception which deosn't say much. Isn't there a nested exception that would explain why?
> (Note: I can see the problem is in instantiating the test. However surefire should *NOT* call the test's constructor. There is a suite() method defined in those tests and it's the goal of the suite to do the instantiations! I believe this is related to MSUREFIRE-20).

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MSUREFIRE-35) Improved errors in console

Posted by "Vincent Massol (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSUREFIRE-35?page=comments#action_58719 ] 

Vincent Massol commented on MSUREFIRE-35:
-----------------------------------------

Just tried again today on a different project and got:

{code}
C:\dev\m2book\code\j2ee\daytrader\functional-tests>mvn clean install
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building DayTrader :: Functional Tests
[INFO]    task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory C:\dev\m2book\code\j2ee\daytrader\functional-tests\target
[INFO] [compiler:testCompile {execution: default}]
Compiling 2 source files to C:\dev\m2book\code\j2ee\daytrader\functional-tests\target\test-classes
[INFO] [surefire:test {execution: default}]
[INFO] Setting reports dir: C:\dev\m2book\code\j2ee\daytrader\functional-tests\target/surefire-reports
 
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
org.apache.maven.surefire.battery.assertion.BatteryTestFailedException: org.apache.geronimo.samples.daytrader.CargoTestSetup
        at org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:258)
        at org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216)
        at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
        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:324)
        at org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.java:285)
        at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:201)
        at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:366)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        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:324)
        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)
Caused by: java.lang.reflect.InvocationTargetException
        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:324)
        at org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)
        ... 29 more
Caused by: java.lang.NullPointerException
        at org.apache.maven.surefire.report.ReporterManager.testFailed(ReporterManager.java:344)
        at org.apache.maven.surefire.report.ReporterManager.testError(ReporterManager.java:334)
        at org.apache.maven.surefire.battery.TestListenerInvocationHandler.handleAddError(TestListenerInvocationHandler.java:151)
        at org.apache.maven.surefire.battery.TestListenerInvocationHandler.invoke(TestListenerInvocationHandler.java:124)
        at $Proxy0.addError(Unknown Source)
        at junit.framework.TestResult.addError(TestResult.java:36)
        at junit.framework.TestResult.runProtected(TestResult.java:133)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        ... 34 more
[surefire] Running org.apache.geronimo.samples.daytrader.FunctionalTest
BATTERY ABORTED
org.apache.maven.surefire.Surefire
org.apache.geronimo.samples.daytrader.FunctionalTest
Exception encountered when invoking execute on a subsuite.
org.apache.geronimo.samples.daytrader.CargoTestSetup
 
Results :
[surefire] Tests run: 0, Failures: 0, Errors: 1
 
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] There are some test failure.
[INFO] ----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 1 minute 5 seconds
[INFO] Finished at: Wed Feb 15 19:49:32 CET 2006
[INFO] Final Memory: 4M/13M
[INFO] ----------------------------------------------------------------------------
 
C:\dev\m2book\code\j2ee\daytrader\functional-tests>
{code}

I believe my tests have an error but Surefire is hiding it. Also I should mentionned that the surefire report is empty (0 bytes).



> Improved errors in console
> --------------------------
>
>          Key: MSUREFIRE-35
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-35
>      Project: Maven 2.x Surefire Plugin
>         Type: Improvement

>     Reporter: Vincent Massol
>     Assignee: Jason van Zyl
>      Fix For: 2.2

>
>
> Here's what I get:
> C:\dev\cargo\trunk\samples\java>mvn clean install
> [...]
> [INFO] [surefire:test]
> [INFO] forkMode: pertest
> [INFO] Setting reports dir: C:\dev\cargo\trunk\samples\java\target/surefire-reports
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.AllContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.EarCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.tomcat.TomcatSpecificTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.WarAndDeployerCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.WarCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] There are some test failure.
> [INFO] ----------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: 33 seconds
> [INFO] Finished at: Wed Dec 21 10:04:55 CET 2005
> [INFO] Final Memory: 5M/13M
> [INFO] ----------------------------------------------------------------------------
> Surefire doesn't report why it cannot instantiate my test cases. It simply invocationtargetexception which deosn't say much. Isn't there a nested exception that would explain why?
> (Note: I can see the problem is in instantiating the test. However surefire should *NOT* call the test's constructor. There is a suite() method defined in those tests and it's the goal of the suite to do the instantiations! I believe this is related to MSUREFIRE-20).

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MSUREFIRE-35) Improved errors in console

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSUREFIRE-35?page=all ]

Carlos Sanchez updated MSUREFIRE-35:
------------------------------------

    Fix Version:     (was: 2.1.2)
                 2.2

> Improved errors in console
> --------------------------
>
>          Key: MSUREFIRE-35
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-35
>      Project: Maven 2.x Surefire Plugin
>         Type: Improvement

>     Reporter: Vincent Massol
>     Assignee: Jason van Zyl
>      Fix For: 2.2

>
>
> Here's what I get:
> C:\dev\cargo\trunk\samples\java>mvn clean install
> [...]
> [INFO] [surefire:test]
> [INFO] forkMode: pertest
> [INFO] Setting reports dir: C:\dev\cargo\trunk\samples\java\target/surefire-reports
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.AllContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.EarCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.tomcat.TomcatSpecificTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.WarAndDeployerCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> java.lang.reflect.InvocationTargetException
>         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:324)
>         at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:678)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:292)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:91)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:61)
>         ... 5 more
> Caused by: java.lang.InstantiationException: org.codehaus.cargo.sample.java.WarCapabilityContainerTest
>         at java.lang.Class.newInstance0(Class.java:293)
>         at java.lang.Class.newInstance(Class.java:261)
>         at org.apache.maven.surefire.battery.SingleTestBattery.<init>(SingleTestBattery.java:42)
>         ... 13 more
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] There are some test failure.
> [INFO] ----------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: 33 seconds
> [INFO] Finished at: Wed Dec 21 10:04:55 CET 2005
> [INFO] Final Memory: 5M/13M
> [INFO] ----------------------------------------------------------------------------
> Surefire doesn't report why it cannot instantiate my test cases. It simply invocationtargetexception which deosn't say much. Isn't there a nested exception that would explain why?
> (Note: I can see the problem is in instantiating the test. However surefire should *NOT* call the test's constructor. There is a suite() method defined in those tests and it's the goal of the suite to do the instantiations! I believe this is related to MSUREFIRE-20).

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org