Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Multi tenancy - NullPointerException(InstanceVariableAttributeAccessor.isNull)
Multi tenancy - NullPointerException [message #1265203] Wed, 05 March 2014 20:21 Go to next message
Viliam Kois is currently offline Viliam Kois
Messages: 6
Registered: March 2014
Junior Member
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 21:14 Go to previous message
Viliam Kois is currently offline Viliam Kois
Messages: 6
Registered: March 2014
Junior Member
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: Tue Oct 21 21:32:35 GMT 2014

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

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