Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358795 - Using orm.xml for Mapped Superclass and annotation for persistence class failed
Summary: Using orm.xml for Mapped Superclass and annotation for persistence class failed
Status: RESOLVED DUPLICATE of bug 349906
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-24 02:57 EDT by Christoph Laeubrich CLA
Modified: 2022-06-09 10:23 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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