OpenJPA
  1. OpenJPA
  2. OPENJPA-917

stored procedures throw InvalidStateException when using getSingleResult() or getResultList()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.0.4, 1.2.1, 1.3.0, 2.0.0-M2
    • Component/s: query
    • Labels:
      None

      Description

      Currently, org.apache.openjpa.persistence.QueryImpl throws an InvalidStateException when any stored procedure is called. The code needs to be updated to allow native queries to continue without the exception.

        Activity

        B.J. Reed created issue -
        Hide
        B.J. Reed added a comment -

        This patch updates QueryImpl.java to bypass the InvalidStateException when a native query is used. Also included is a JUnit test case that creates / loads / uses / drops a Derby stored procedure. This patch was created on the openjpa 1.2.x branch and should also be applied and verified on trunk.

        This fix does not fix the case where returning objects from stored procedures is not working properly - a new JIRA will be opened for this improvement

        Show
        B.J. Reed added a comment - This patch updates QueryImpl.java to bypass the InvalidStateException when a native query is used. Also included is a JUnit test case that creates / loads / uses / drops a Derby stored procedure. This patch was created on the openjpa 1.2.x branch and should also be applied and verified on trunk. This fix does not fix the case where returning objects from stored procedures is not working properly - a new JIRA will be opened for this improvement
        B.J. Reed made changes -
        Field Original Value New Value
        Attachment OPENJPA-917.patch [ 12399924 ]
        Hide
        Michael Dick added a comment -

        Thanks for the patch B.J!

        Show
        Michael Dick added a comment - Thanks for the patch B.J!
        Michael Dick made changes -
        Fix Version/s 1.3.0 [ 12313326 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 2.0.0 [ 12313483 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.2.1 [ 12313328 ]
        Fix Version/s 1.2.0 [ 12313102 ]
        Michael Dick made changes -
        Fix Version/s 1.0.4 [ 12313301 ]
        Michael Dick made changes -
        Assignee B.J. Reed [ bjreed ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        2d 4h 9m 1 Michael Dick 12/Feb/09 19:08
        Resolved Resolved Closed Closed
        389d 23h 22m 1 Donald Woods 09/Mar/10 18:31

          People

          • Assignee:
            B.J. Reed
            Reporter:
            B.J. Reed
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development