Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-387

Getting "java.lang.ClassNotFoundException" when loading datacache plug-in which is a class outside of OpenJPA package.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.0.1, 1.1.0
    • datacache
    • None

    Description

      Getting "java.lang.ClassNotFoundException" when loading datacache plug-in which is a class outside of OpenJPA package.

      This happens when loading the class as DatCache plug-in but it can potentially happen to any plug-in classes that reside outside of OpenJPA package. In order to load these classes, the fix is to get the class loader (by calling findDerivedLoader with no interface loader, loader = null) to load it again when the current class loading fails and the target class is not part of OpenJPA package. The same exception is still thrown if the second attempt fail or the target class is actually part of OpenJPA.

      Please see the patch for detail changes.

      Attachments

        1. JIRA387.zip
          2 kB
          Daniel Lee
        2. OPENJPA-387.patch
          3 kB
          Kevin W. Sutter

        Activity

          People

            dtlee Daniel Lee
            dtlee Daniel Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: