Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » @MappedSuperclass with Generic types(java.lang.IndexOutOfBoundsException)
@MappedSuperclass with Generic types [message #896422] Wed, 18 July 2012 07:04 Go to next message
Badr Elhouari is currently offline Badr Elhouari
Messages: 2
Registered: July 2012
Junior Member
Hi I'm using EclipseLink for testing purpose with Arquillian 1.0.1.Final & glassfish embedded all 3.1.2

When running the test I get an error that the Predeployment of my PersistenceUnit failed due to an error regarding @MappedSuperclass with Generic types.

Here is the main cause of the exception:

Quote:

Caused by: java.lang.IndexOutOfBoundsException: Index: 8, Size: 8
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAsmFactory.resolveGenericTypes(MetadataAsmFactory.java:165)
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor.resolveGenericTypes(ClassAccessor.java:1611)
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.discoverMappedSuperclassesAndInheritanceParents(EntityAccessor.java:282)
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.preProcess(EntityAccessor.java:526)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage1(MetadataProject.java:1608)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:531)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:526)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1337)



I'm wondering if it's a bug? or my design isn't correct (The same design with same Test work fine with Hibernate !)

Here is the code I'm using:

@MappedSuperclass
public abstract class GenericEntity<PK> implements Serializable {
...
}


@MappedSuperclass
public abstract class SecondGenericEntity<PK> extends GenericEntity<PK> { 
}


@Entity
@Table(name = "MY_ENTITY")
public class MyEntity extends SecondGenericEntity<Long> { 
}




Re: @MappedSuperclass with Generic types [message #896728 is a reply to message #896422] Thu, 19 July 2012 09:59 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1018
Registered: July 2009
Senior Member
Bug 372092 was filed for what looks like the same issue, but a reproducable test case was not provided and it works in EclipseLink's tests. Please upload a test case to this bug or a new one.

Best Regards,
Chris
Re: @MappedSuperclass with Generic types [message #898764 is a reply to message #896422] Fri, 27 July 2012 09:36 Go to previous message
Badr Elhouari is currently offline Badr Elhouari
Messages: 2
Registered: July 2012
Junior Member
Here is a related test case (Attached "testcase-372092.zip") see also https://bugs.eclipse.org/bugs/show_bug.cgi?id=372092

[Updated on: Fri, 27 July 2012 09:36]

Report message to a moderator

Previous Topic:EclipseLink workbench: where is BLOB column type?
Next Topic:MOXy + Tomcat6 + Maven
Goto Forum:
  


Current Time: Sat Aug 30 18:27:40 EDT 2014

Powered by FUDForum. Page generated in 0.03899 seconds