[jboss-jira] [JBoss JIRA] Commented: (JBAS-7183) RepositoryClassLoader tries to call ClassNotFoundException.initCause

Markus Kilås (JIRA) jira-events at lists.jboss.org
Tue Aug 18 08:10:26 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBAS-7183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12481442#action_12481442 ] 

Markus Kilås commented on JBAS-7183:
------------------------------------

Suggested change in org.jboss.mx.loading.RepositoryClassLoader.findClass(String):

623,624c623
<          ClassNotFoundException e = new ClassNotFoundException(msg);
<          e.initCause(this.unregisterTrace);
---
>          ClassNotFoundException e = new ClassNotFoundException(msg, this.unregisterTrace);


> RepositoryClassLoader tries to call ClassNotFoundException.initCause
> --------------------------------------------------------------------
>
>                 Key: JBAS-7183
>                 URL: https://jira.jboss.org/jira/browse/JBAS-7183
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: JBossAS-4.2.3.GA
>         Environment: OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu11), OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode)
>            Reporter: Markus Kilås
>         Attachments: output.log
>
>
> After redeployment of one of two enterprise applications living on the server I get an "IllegalStateException: Can't overwrite cause" from the RepositoryClassLoader (see attached stacktrace) when a web module is being initialized.  After some investigation I suspect the reason for an error could be that both applications shares some utility class and therefore both the enterprise applications has to be undeployed.
> This however should not cause an illegal state exception. Looking in the source of RepositoryClassLoader indicates that the intended error message should be "Invalid use of destroyed classloader  UCL destroyed" but the code tries to call Throwable.initCause() on an java.lang.ClassNotFoundException which is not allowed causing an IllegalStateException.
> A simple fix would be to use the constructor that takes a cause instead of explicitly call initCause() (see attached patch (untested)).

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

       




More information about the jboss-jira mailing list