Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » MultiTenancy/Inheritance: Strange NPE
MultiTenancy/Inheritance: Strange NPE [message #933092] Thu, 04 October 2012 18:21 Go to next message
Thomas Kratz is currently offline Thomas KratzFriend
Messages: 165
Registered: July 2009
Senior Member
Hi, I'm not getting it. I have a
public class ArticleBook extends AbstractArticle implements {

	public Book getBook() {
		return book;

	public void setBook(Book book) { = book;

that extends
@Table(name = "acc_article")
@Multitenant( value=MultitenantType.TABLE_PER_TENANT)
public abstract class AbstractArticle extends BasePropertyChangeSupport implements,DeletableEntity {

Book itself is multitenant,too.

with this setup I can reproduce

Caused by: java.lang.NullPointerException
	at org.eclipse.persistence.mappings.ForeignReferenceMapping.isLockableMapping(
	at org.eclipse.persistence.descriptors.ClassDescriptor.postInitialize(
	at org.eclipse.persistence.descriptors.ClassDescriptor.postInitialize(
	at org.eclipse.persistence.internal.sessions.AbstractSession.updateTablePerTenantDescriptors(
	at org.eclipse.persistence.sessions.server.ClientSession.<init>(
	at org.eclipse.persistence.sessions.server.ServerSession.acquireClientSession(
	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.getActivePersistenceContext(
	at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.begin(
	at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(
	at org.springframework.orm.jpa.JpaTransactionManager.doBegin(

Can anyone give me an idea what causes the referenceDescriptor to be null here?

Any (quick Smile help will be appreciated.


[Updated on: Thu, 04 October 2012 18:21]

Report message to a moderator

Re: MultiTenancy/Inheritance: Strange NPE [message #939171 is a reply to message #933092] Wed, 10 October 2012 13:43 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Do you get the error if you remove @Multitenant?

There could be an issue with this an inheritance. Does it work without the inheritance?

Ensure you have created your persistence unit correctly.

It could be a bug, try the latest 2.4 patch version to see if it has been fixed, otherwise log a bug with all of your code and details.

James : Wiki : Book : Blog : Twitter
Previous Topic:Implemeting postMerge events
Next Topic:Templates for CREATE, INSERT, UPDATE, DELETE queries
Goto Forum:

Current Time: Wed Jan 27 02:02:40 GMT 2021

Powered by FUDForum. Page generated in 0.01990 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top