FYI -- I've downloaded all of the available versions of OpenJPA from the maven server. The last 1.0.4 build does not throw this exception, neither does the last 1.1.1 build. The exception is thrown for all of the version after this -- I tested the 1.2.0, 1.2.1, and 1.3.0 versions and all throw the same exception. Hopefully this can help you to pin down the cause.
Gretchen Chiaramonte wrote: > > I've attached the entities. I get the exception when trying to fetch > Employee (which references MasterEmployeeKeyMap, which in turn references > all the others) or when just trying to fetch MasterEmployeeKeyMap. The > exception appears to be on the first query being done for > MasterEmployeeKeyMap in either case, which is the join that fetches > CmvcCredential. This is a ManyToMany reference which uses a JoinTable (my > suspicion is that the JoinTable is the source of the issue, since I have > OneToOne references and ManyToOne references in other entites that are not > giving me any problems. > > Thanks, > Gretchen > > > Jeremy Bauer wrote: >> >> 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. >>> >>> >> >> > http://n2.nabble.com/file/n1660105/Employee.java Employee.java > http://n2.nabble.com/file/n1660105/MasterEmployeeKeyMap.java > MasterEmployeeKeyMap.java > http://n2.nabble.com/file/n1660105/CmvcCredential.java CmvcCredential.java > http://n2.nabble.com/file/n1660105/RetainCredential.java > RetainCredential.java http://n2.nabble.com/file/n1660105/Manager.java > Manager.java http://n2.nabble.com/file/n1660105/JobPosition.java > JobPosition.java http://n2.nabble.com/file/n1660105/TeamStandalone.java > TeamStandalone.java > -- View this message in context: http://n2.nabble.com/IndexOutOfBoundsException-in-SQLBuffer-in-OpenJPA-1.3.0-SNAPSHOT-r422266%3A724815-tp1659513p1663126.html Sent from the OpenJPA Developers mailing list archive at Nabble.com.
