Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » Multi tenancy - NullPointerException(InstanceVariableAttributeAccessor.isNull)
Multi tenancy - NullPointerException [message #1265203] Wed, 05 March 2014 15:21 Go to next message
Eclipse UserFriend
I'm using Spring with EclipseLink. After adding:

@Multitenant(MultitenantType.TABLE_PER_TENANT)
@TenantTableDiscriminator(type= TenantTableDiscriminatorType.SCHEMA, contextProperty="employee-tenant.id")

I got this exception:

Caused by: Exception [EclipseLink-69] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.DescriptorException
...
Caused by: java.lang.NullPointerException
	at org.eclipse.persistence.internal.descriptors.InstanceVariableAttributeAccessor.getAttributeValueFromObject(InstanceVariableAttributeAccessor.java:76)
	... 75 more


I've put property "eclipselink.tenant-id" to EntityManager after transaction begun, by extending org.springframework.orm.jpa.JpaTransactionManager. I don't have any extra settings on persistence.xml. I was playing with share-emf and share-cache, but it didn't help. I was trying different JVM (6,7,8 ) (i saw mark in your code), but it didn't help too.

After debuging, I've realize, that instance of InstanceVariableAttributeAccessor is created by cloning. The source instance have attribute attributeField null.

Selecting objects from DB works without error, but when I'm trying persist new instance, i got this exception.

Please, could you help me?
Re: Multi tenancy - NullPointerException [message #1275910 is a reply to message #1265203] Sun, 23 March 2014 17:14 Go to previous message
Eclipse UserFriend
In my opinion, this is a major bug in multi-tenancy functionality. When do you plan to fix it?
Previous Topic:append Postgres Full Text Search expression after having CriteriaQuery
Next Topic:NPE merging @ManyToOne entity
Goto Forum:
  


Current Time: Wed Jul 23 10:22:39 EDT 2025

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

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

Back to the top