openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-1381) IllegalStateException on query method call after named query is created twice.
Date Thu, 12 Nov 2009 07:25:39 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pinaki Poddar resolved OPENJPA-1381.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.0.0)
                   2.0.0-M4

Albert, see if this works. Otherwise I will reopen.

> IllegalStateException on query method call after named query is created twice.
> ------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1381
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1381
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.0.0
>            Reporter: Albert Lee
>            Assignee: Pinaki Poddar
>             Fix For: 2.0.0-M4
>
>
> When a query method is called (e.g. setLockMode) on a named query that has been created
twice, an IllegalStateException is thrown:
>   Query q1 = em.createNamedQuery("xxxx");
>   ,,,,
>   Query q2 = em.createNamedQuery("xxxx");
>   q2.setLockMode(READ);
> 11078  test  TRACE  [Thread-4] Tests - Caught exception and continue: java.lang.IllegalStateException:
Query is neither a JPQL SELECT nor a Criteria API query.
> 11078  test  TRACE  [Thread-4] DumpStack - java.lang.IllegalStateException: Query is
neither a JPQL SELECT nor a Criteria API query.
> 	at org.apache.openjpa.persistence.QueryImpl.assertJPQLOrCriteriaQuery(QueryImpl.java:377)
> 	at org.apache.openjpa.persistence.QueryImpl.setLockMode(QueryImpl.java:396)
> 	at org.apache.openjpa.persistence.QueryImpl.setLockMode(QueryImpl.java:1)
> 	at org.apache.openjpa.persistence.lockmgr.SequencedActionsTest.launchCommonSequence(SequencedActionsTest.java:409)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message