You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-dev@maven.apache.org by "Jason van Zyl (JIRA)" <ji...@codehaus.org> on 2006/02/28 02:13:36 UTC

[jira] Commented: (SUREFIRE-33) java.lang.ExceptionInInitializerError in TestCase constructor kills surefire without letting any log

    [ http://jira.codehaus.org/browse/SUREFIRE-33?page=comments#action_59600 ] 

Jason van Zyl commented on SUREFIRE-33:
---------------------------------------

Do you have a little snippet of code I could use?

> java.lang.ExceptionInInitializerError in TestCase constructor kills surefire without letting any log
> ----------------------------------------------------------------------------------------------------
>
>          Key: SUREFIRE-33
>          URL: http://jira.codehaus.org/browse/SUREFIRE-33
>      Project: surefire
>         Type: Bug

>  Environment: maven 2.0.2
> surefire 1.5.3-SNAPSHOT
>     Reporter: Jerome Lacoste
>     Assignee: Jason van Zyl
>     Priority: Critical
>      Fix For: 1.5.3

>
>
> In my case the Error is caused by Spring raising a java.lang.NoClassDefFoundError.
> This is problematic in particular when surefire is forked, there is no output displayed.
> Here's the relevant stack trace:
> java.lang.ExceptionInInitializerError
>         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.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:130)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         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:585)
>         at org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.java:305)
>         at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:221)
>         at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:368)
>         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)
>  
> And the message that appears when surefire is not forked.
>  
> RUN ABORTED
> java.lang.ExceptionInInitializerError
> org.apache.maven.surefire.Runner
> An exception or error caused a run to abort.
> null
>  
> Results :
> [surefire] Tests run: 0, Failures: 0, Errors: 1

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