maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Rosenvold (JIRA)" <j...@codehaus.org>
Subject [jira] Updated: (SUREFIRE-85) java.lang.NoClassDefFoundError: org/apache/maven/surefire/util/NestedCheckedException
Date Wed, 05 Jan 2011 07:44:58 GMT

     [ http://jira.codehaus.org/browse/SUREFIRE-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kristian Rosenvold updated SUREFIRE-85:
---------------------------------------

    Comment: was deleted

(was: 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
>          Components: classloading
>    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

        

Mime
View raw message