openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amy Yang (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-536) getMetaData() causes OutOfMemoryError under some cases
Date Thu, 13 Mar 2008 05:27:46 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Amy Yang updated OPENJPA-536:
-----------------------------

    Description: 
There are 3 classes: Item, Artist and Person. Artist extends Person. 
Invoking JPAFacadeHelper.getMetaData(emf, Item.class) will cause OutOfMemoryError thrown by
org.apache.openjpa.meta.MetaDataRepository.processBuffer().



  was:
Comparison of such classes will return a incorrect result: Item, Artist and Person. Artist
extends Person. The comparator will report:
Item < Person
Person < Artist
Artist < Item
It will cause OutOfMemoryError thrown by org.apache.openjpa.meta.MetaDataRepository.processBuffer().

        Summary: getMetaData() causes OutOfMemoryError under some cases  (was: InheritanceComparator
does not work under some cases)

It is because when constructing the TreeSet, the Item will be the root. The handling order
will be Item, Person, Artist.
The the comparator will report Artist < Item and Person > Item. So the TreeSet will
be 
    Item
  /         \
Artist   Person

Then when traversing the TreeSet and pop the first one, after Item is removed, the TreeSet
will be 
    Person
   /
Artist
The comparator will report Person < Artist so the TreeSet is incorrect.

> getMetaData() causes OutOfMemoryError under some cases
> ------------------------------------------------------
>
>                 Key: OPENJPA-536
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-536
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.0.2, 1.0.3
>         Environment: Sun JDK 5
>            Reporter: Amy Yang
>            Priority: Blocker
>
> There are 3 classes: Item, Artist and Person. Artist extends Person. 
> Invoking JPAFacadeHelper.getMetaData(emf, Item.class) will cause OutOfMemoryError thrown
by org.apache.openjpa.meta.MetaDataRepository.processBuffer().

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