[ 
https://issues.apache.org/jira/browse/OPENJPA-838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658155#action_12658155
 ] 

Fay Wang commented on OPENJPA-838:
----------------------------------

The problem of parameter setting when cache is on is a result of how OpenJPA 
processes parameters.  There is no distinction between literal vs. 
user-specified parameters and there is no clear-cut way to separate parameter 
setting logic from the logic to reconstruct SQLBuffer within SelectImpl, making 
re-using SQLBuffer within SelectImpl impossible, 

> fix parameter setting problem when QuerySQLCache is on
> ------------------------------------------------------
>
>                 Key: OPENJPA-838
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-838
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.0
>            Reporter: Fay Wang
>             Fix For: 1.2.1, 1.3.0, 2.0.0
>
>
> java.lang.IndexOutOfBoundsException
>     at java.util.ArrayList.get(Unknown Source)
>     at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:629)
>     at
> org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:529)
>     at
> org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:485)
>     at
> org.apache.openjpa.jdbc.sql.SelectImpl.prepareStatement(SelectImpl.java:463)
>     at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:379)
>     at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:339)
>     at
> org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:420)
>     at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
>     at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
>     at
> org.apache.openjpa.jdbc.meta.strats.StoreCollectionFieldStrategy.load(StoreCollectionFieldStrategy.java:629)
>     at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:822)
>     at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:682)
>     at
> org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:116)
>     at org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78)
>     at
> org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.java:2924)
>     at
> org.apache.openjpa.kernel.StateManagerImpl.load(StateManagerImpl.java:379)
>     at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:864)

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

Reply via email to