openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B.J. Reed (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1508) ArrayIndexOutOfBoundsException being thrown from ClassMetaData.getExtraFieldDataIndex()
Date Fri, 12 Feb 2010 20:20:30 GMT

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

B.J. Reed commented on OPENJPA-1508:
------------------------------------

Forgot to mention that one work around we found for this problem is that if both Lower entities
use LAZY fetches in stead of EAGER fetches, then the exception won't be thrown.

> 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.


Mime
View raw message