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

Use of XMLValueHandler results in a NullPointerException when classloader does not provide package support

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0, 2.0.1, 2.1.0, 2.3.0
    • 2.2.0
    • jdbc
    • None
    • JEE Environment
    • Patch Available

    Description

      XMLValueHandler is used to convert xml content from database to java object. It threw NullPointerException from XMLValueHandler.toObjectValue() when class loader does not provide package support.

      Basically getPackage() function call in XMLValueHandler.toObjectValue returns null.

      The fix is to parse the entity class name directly to retrieve the package name.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            helenxu Helen Xu
            helenxu Helen Xu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment