Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358795

Summary: Using orm.xml for Mapped Superclass and annotation for persistence class failed
Product: z_Archived Reporter: Christoph Laeubrich <laeubi>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: guy.pelletier
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Christoph Laeubrich CLA 2011-09-24 02:57:17 EDT
Build Identifier: 2.3.0.v20110604-r9504

If you add an orm.xml mapping to mark a (for example generated) java class as a mappedsuperclass and the derive from this class and mark it with annotation the EntityManager fails with a null-pointer on schema generation.

Described in more detail here: http://www.eclipse.org/forums/index.php?t=rview&goto=726870

Doing everything with annotations works fine.

Reproducible: Always

Steps to Reproduce:
Described here: http://www.eclipse.org/forums/index.php?t=rview&goto=726870

Workaround:
As mentioned by James "To workaround the issue try defining both in XML or both in annotations."
Comment 1 Guy Pelletier CLA 2011-09-28 10:11:49 EDT
This is a duplicate of bug 349906.

If possible, please try/use a nightly build of 2.3.1

http://www.eclipse.org/eclipselink/downloads/nightly.php

Otherwise, the work around as James suggested is to include the entity in XML as well (just declare it in XML)

e.g.

<entity class="PersistentLabResultType"/>

*** This bug has been marked as a duplicate of bug 349906 ***
Comment 2 Christoph Laeubrich CLA 2011-09-28 12:42:15 EDT
(In reply to comment #1)
> If possible, please try/use a nightly build of 2.3.1

I can confirm that this problem is solved in the eclipselink-plugins-2.3.1.v20110928-r10176 build.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:23:53 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink