Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367107 - Deploying PU: NPE in EntityAccessor.discoverMappedSuperclassesAndInheritanceParents
Summary: Deploying PU: NPE in EntityAccessor.discoverMappedSuperclassesAndInheritanceP...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 367575 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-19 12:26 EST by eugeis CLA
Modified: 2022-06-09 10:33 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eugeis CLA 2011-12-19 12:26:53 EST
Build Identifier: Implementation-Version: 2.3.2.v20111125-r10461

Similar to Bug 350516

I have NPE in eclipselink 2.3.2 release, because the parentClass is null.
This is the statement "243:while (! parentClass.isObject()) {"




Workaround is to extend the Base class  explicit from Object, like  
public class Base extends Object {


Please fix like
"243:while (parentClass!=null && !parentClass.isObject()) {"


   [exec] java.lang.NullPointerException
   [exec]     at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.discoverMappedSuperclassesAndInheritanceParents(EntityAccessor.java:243)
   [exec]     at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.preProcess(EntityAccessor.java:526)
   [exec]     at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage1(MetadataProject.java:1608)
   [exec]     at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:531)
   [exec]     at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:526)
   [exec]     at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1337)
   [exec]     at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:208)
   [exec]     at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:393)
   [exec]     at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:386)
   [exec]     at weblogic.deployment.BasePersistenceUnitInfoImpl.<init>(BasePersistenceUnitInfoImpl.java:158)
   [exec]     at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:39)
   [exec]     at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:349)
   [exec]     at weblogic.deployment.EarPersistenceUnitRegistry.initialize(EarPersistenceUnitRegistry.java:72)

Reproducible: Always

Steps to Reproduce:
To reproduce, deploy a JPA Entity in this class hierarchy:

@Entity
public class ExampleEntity extends BaseEntityImpl {
...
}

@MappedSuperclass
public class BaseEntityImpl extends Base{
...
}

public class Base {
...
}
Comment 1 Tom Ware CLA 2011-12-19 14:47:21 EST
What Operating System are you on?

What VM are you using?
Comment 2 eugeis CLA 2012-01-10 08:53:45 EST
- Windows XP SP3
- jdk160_24

(In reply to comment #1)
> What Operating System are you on?
> 
> What VM are you using?
Comment 3 Tom Ware CLA 2012-01-23 10:42:27 EST
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 4 Tom Ware CLA 2012-01-23 10:59:56 EST
*** Bug 367575 has been marked as a duplicate of this bug. ***
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:15:26 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:33:48 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink