Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7183

RepositoryClassLoader tries to call ClassNotFoundException.initCause

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: JBossAS-4.2.3.GA
    • Fix Version/s: No Release
    • Component/s: None
    • Labels:
      None
    • Environment:

      OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu11), OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode)

      Description

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

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                netmackan Markus Kilås
              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: