Last active
October 21, 2017 08:41
-
-
Save odrotbohm/5832121 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@MappedSuperclass | |
public abstract class AbstractAuditable<U, PK extends Serializable> extends AbstractPersistable<PK> implements | |
Auditable<U, PK> { | |
// … | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@MappedSuperclass | |
public abstract class AbstractPersistable<PK extends Serializable> implements Persistable<PK> { | |
@Id | |
@GeneratedValue(strategy = GenerationType.AUTO) | |
private PK id; | |
// … | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class AuditableUser extends AbstractAuditable<AuditableUser, Long> { | |
// … | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Persistable<ID extends Serializable> extends Serializable { | |
ID getId(); | |
boolean isNew(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception Description: Predeployment of PersistenceUnit [default] failed. | |
Internal Exception: Exception [EclipseLink-7247] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ValidationException | |
Exception Description: A circular reference was discovered processing derived IDs on the following Entity classes: [[org.springframework.data.jpa.domain.sample.AuditableUser]] | |
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:230) ~[org.eclipse.persistence.core-2.5.0.jar:na] | |
... 51 common frames omitted | |
Caused by: org.eclipse.persistence.exceptions.ValidationException: | |
Exception Description: A circular reference was discovered processing derived IDs on the following Entity classes: [[org.springframework.data.jpa.domain.sample.AuditableUser]] | |
at org.eclipse.persistence.exceptions.ValidationException.idRelationshipCircularReference(ValidationException.java:989) ~[org.eclipse.persistence.core-2.5.0.jar:na] | |
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor.processDerivedId(ClassAccessor.java:1602) ~[org.eclipse.persistence.jpa-2.5.0.jar:na] | |
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.processDerivedId(EntityAccessor.java:987) ~[org.eclipse.persistence.jpa-2.5.0.jar:na] | |
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor.processDerivedId(ClassAccessor.java:1614) ~[org.eclipse.persistence.jpa-2.5.0.jar:na] | |
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.processDerivedId(EntityAccessor.java:987) ~[org.eclipse.persistence.jpa-2.5.0.jar:na] | |
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processAccessorsWithDerivedIDs(MetadataProject.java:1522) ~[org.eclipse.persistence.jpa-2.5.0.jar:na] | |
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1819) ~[org.eclipse.persistence.jpa-2.5.0.jar:na] | |
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:580) ~[org.eclipse.persistence.jpa-2.5.0.jar:na] | |
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:585) ~[org.eclipse.persistence.jpa-2.5.0.jar:na] | |
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1865) ~[org.eclipse.persistence.jpa-2.5.0.jar:na] | |
... 49 common frames omitted |
Thanks for the feedback! I've added the declaration of Persistable
and filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=411560.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was able to reproduce the error. EclipseLink is not resolving the generic types correctly and it is specifically related to the interface implementation declaration. Commenting them out will get past the exception for the time being.
Can you enter a bug with this model and information?