Hi Gretchen, Please attach the entities and let me know which entity you are attempting to use in the find. Thanks for doing the initial debug!
-Jeremy On Mon, Dec 15, 2008 at 1:15 PM, Gretchen Chiaramonte <[email protected]>wrote: > > Forgot to say that this same query works fine in the version of OpenJPA > shipped with WebSphere v6.1. It fails in a very similar way on the version > of OpenJPA shipped with WebSphere 7.0, which is why I tried downloading the > latest 1.3.0 version. Let me know if you need copies of the entities that > I'm trying to fetch. > > > > Gretchen Chiaramonte wrote: > > > > Receiving the following stack trace using the latest 1.3.0 build: > > > > 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) > > > > I downloaded the source for this build and traced through the execution, > > and it appears to be caused by the same value getting added to the > > parmList twice in > > StoreCollectionFieldStrategy.load() > > The query that is being run contains one parameter in the WHERE clause, > > but an ArrayList containing two (identical) parameter values is being > > passed to SQLBuffer.setParameters(). > > The trace of StoreCollectionFieldStrategy.load() shows the parmList List > > getting the parameter value added in the call to sel.wherePrimaryKey(...) > > (line 608) and the value being added to the parmList again in the call to > > parmList.addAll(nonFKParams) (line 614). > > > > -- > View this message in context: > http://n2.nabble.com/IndexOutOfBoundsException-in-SQLBuffer-in-OpenJPA-1.3.0-SNAPSHOT-r422266%3A724815-tp1659513p1659537.html > Sent from the OpenJPA Developers mailing list archive at Nabble.com. > >
