Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 14140 invoked from network); 12 Feb 2010 20:18:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Feb 2010 20:18:53 -0000 Received: (qmail 89657 invoked by uid 500); 12 Feb 2010 20:18:52 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 89564 invoked by uid 500); 12 Feb 2010 20:18:51 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 89386 invoked by uid 99); 12 Feb 2010 20:18:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Feb 2010 20:18:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Feb 2010 20:18:49 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0E370234C052 for ; Fri, 12 Feb 2010 12:18:28 -0800 (PST) Message-ID: <822417138.239331266005908057.JavaMail.jira@brutus.apache.org> Date: Fri, 12 Feb 2010 20:18:28 +0000 (UTC) From: "B.J. Reed (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1508) ArrayIndexOutOfBoundsException being thrown from ClassMetaData.getExtraFieldDataIndex() In-Reply-To: <1828905357.239321266005908029.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] B.J. Reed updated OPENJPA-1508: ------------------------------- Attachment: tc.zip has the test case to demonstrate the exception. > ArrayIndexOutOfBoundsException being thrown from ClassMetaData.getExtraFieldDataIndex() > --------------------------------------------------------------------------------------- > > Key: OPENJPA-1508 > URL: https://issues.apache.org/jira/browse/OPENJPA-1508 > Project: OpenJPA > Issue Type: Bug > Components: jdbc > Affects Versions: 1.2.2 > Environment: found this on DB2, but I imagine it doesn't matter > Reporter: B.J. Reed > Fix For: 1.2.3, 1.3.0, 2.0.1, 2.1.0 > > Attachments: tc.zip > > > An ArrayIndexOutOfBoundsException is being thrown by ClassMetaData.getExtraFieldDataIndex() > I am providing a test case. The only thing special is that the entities are set up in a hexagon shape, where the entities above have a OneToMany relationship with those below. The one at the very bottom has ManyToOne relationships with the two entities above it and I think this seems to be the cause of the problem. > I have done some debugging on this and here is where I have gotten to: > The problem is somewhere around the JDBCStoreManager.initializeState method > first time through, the mapping object is org.apache.openjpa.persistence.jdbc.query.HexagonBottom and the mappedByFieldMapping is > org.apache.openjpa.persistence.jdbc.query.HexagonBottom.lowerLeftId (looks good), index is 6 > second time through, the mapping object is org.apache.openjpa.persistence.jdbc.query.HexagonLowerRight and the mappedByFieldMapping is still org.apache.openjpa.persistence.jdbc.query.HexagonBottom.lowerLeftId, so the index is still 6, but the HexagonLowerRight object only has 4 fields in it so the exception is thrown. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.