Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1241

Actual ClassNotFoundException is hidden when loading classes with GCL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0-JSR-5
    • 1.0-JSR-6
    • groovy-jdk
    • None

    Description

      When loading a class through the GroovyClassLoader the actual class which is not found is hidden when a ClassNotFoundException occurs in a parent class.

      I discovered this in grails when loading test cases. Test cases extend GroovyTestCase the exception thrown is:

      ClassNotFoundException: GroovyTestCase

      But the actual reason was that junit.jar was not on the classpath and hence GroovyTestCase could not be loaded as it referenced the junit classes.

      This is very mysterious and difficult to debug and needs fixing

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            graemerocher Graeme Rocher
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: