|Multi tenancy - NullPointerException [message #1265203]
||Wed, 05 March 2014 20:21
| Viliam Kois
Registered: March 2014
I'm using Spring with EclipseLink. After adding:|
@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
... 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?
Powered by FUDForum
. Page generated in 0.10876 seconds