[ http://jira.codehaus.org/browse/SUREFIRE-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=248977#action_248977 ]
Kristian Rosenvold commented on SUREFIRE-85: -------------------------------------------- I am not entitrely sure if all "me toos" on this thread have seen the same stacktrace or just the same message. There's a large hole were this exception can occur, which has been there all along but is a lot easier to see on the current trunk: The booter starts with ForkedBooter#main method. When this method is invoked, surefire-api is NOT on the classpath. All the way into runSuitesInProcess, the exception is not on the classpath. Technically classloader switch happens on "provider.invoke", at which point the context classloader is switched. Although restructured, the logic & flow of this code is unchanged from a LONG time back, so this is the likely source of this problem. For example the catch blocks in the SurefireStarter#invokeProvider method simply will not work. The solution to this is either to make sure that the surefire exceptions do not propagate into the code running in the system classloader, or to add surefire-api to the boot classpath, or to split the api module into several different modules, one which has to be on the boot classpath. The latter solution effectively means permanently accepting that surefire-api changes are hard, but I am not sure if it changes the current reality much. I will looking into fixing this issue. > java.lang.NoClassDefFoundError: > org/apache/maven/surefire/util/NestedCheckedException > ------------------------------------------------------------------------------------- > > Key: SUREFIRE-85 > URL: http://jira.codehaus.org/browse/SUREFIRE-85 > Project: Maven Surefire > Issue Type: Bug > Affects Versions: 2.0 (2.2 plugin) > Environment: Windows XP / Sun JDK 1.5.0_06 > Reporter: David J. M. Karlsen > Fix For: Backlog > > Attachments: log.txt > > > java.lang.NoClassDefFoundError: > org/apache/maven/surefire/util/NestedCheckedException > Exception in thread "main" > is thrown during execution of the maven-surefire-plugin -- 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