OpenJPA
  1. OpenJPA
  2. OPENJPA-1546

OpenJPA doesn't work as internal JPA inside web applicaion in JBoss AS

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-beta2
    • Fix Version/s: 2.0.0-beta3
    • Component/s: None
    • Labels:
      None
    • Environment:
      JBoss AS 5.1
    • Patch Info:
      Patch Available

      Description

      OpenJPA fails to complete the initialization phase if it is used as an internal library inside web application and this application is deployed to the JBoss AS. The problem is that PersistenceMetaDataFactory tries to parse the directory as an unparsed XML file. It takes the URL to this XML file from the list of the unparsed files. But the URL that points to a directory is added to this list. This URL is added to the unparsed files in the mapPersistentTypeNames method of the PersistenceMetaDataFactory class.
      I've attached the stack trace of the original error and the patch with possible fix.

      1. openjpa-jboss.patch
        0.8 kB
        Dmitri Babaev
      2. stack-trace.txt
        15 kB
        Dmitri Babaev
      3. OPENJPA-1546.diff
        2 kB
        Donald Woods
      4. OPENJPA-1546-13x.diff
        2 kB
        Donald Woods

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3h 20m 1 Donald Woods 02/Mar/10 16:55
        Resolved Resolved Closed Closed
        27d 6h 22m 1 Donald Woods 30/Mar/10 00:17
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Donald Woods made changes -
        Fix Version/s 2.0.0-beta3 [ 12314857 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Donald Woods made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Donald Woods [ drwoods ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Resolution Fixed [ 1 ]
        Hide
        Donald Woods added a comment -

        committed to trunk as r918070 and 1.3.x as r918110

        Show
        Donald Woods added a comment - committed to trunk as r918070 and 1.3.x as r918110
        Donald Woods made changes -
        Attachment OPENJPA-1546-13x.diff [ 12437613 ]
        Hide
        Donald Woods added a comment -

        same patch for 13x

        Show
        Donald Woods added a comment - same patch for 13x
        Hide
        Kevin Sutter added a comment -

        Thanks for debugging the problem, Dmitri. Thanks for taking a first look at the patch, Donald. Overall, the updated patch looks good. I'd adjust the spelling of "parced" and format it more consistently. But, other than that, it looks good. Thanks.

        Show
        Kevin Sutter added a comment - Thanks for debugging the problem, Dmitri. Thanks for taking a first look at the patch, Donald. Overall, the updated patch looks good. I'd adjust the spelling of "parced" and format it more consistently. But, other than that, it looks good. Thanks.
        Donald Woods made changes -
        Attachment OPENJPA-1546.diff [ 12437605 ]
        Hide
        Donald Woods added a comment -

        Slight variation of the patch, which matches the existing checks for !URL and isClass

        Show
        Donald Woods added a comment - Slight variation of the patch, which matches the existing checks for !URL and isClass
        Dmitri Babaev made changes -
        Field Original Value New Value
        Attachment openjpa-jboss.patch [ 12437600 ]
        Attachment stack-trace.txt [ 12437601 ]
        Dmitri Babaev created issue -

          People

          • Assignee:
            Donald Woods
            Reporter:
            Dmitri Babaev
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development