Failed to persist object through ClusterJPA
Posted by:
Lu Boying
Date: July 07, 2014 01:57AM
I tried to persist a simple object into Cluser thourgh ClusterJPA using following snippet:
EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("mydb");
EntityManager em = entityManagerFactory.createEntityManager();
EntityTransaction userTransaction = em.getTransaction();
userTransaction.begin();
ProjectJPA project = new ProjectJPA();
project.setId(new Long(100));
project.setTenantOrg("tid1");
project.setQuotaGB(1000);
project.setQuotaEnabled(1);
em.persist(project);
userTransaction.commit();
But I got following error:
Caused by: com.mysql.clusterj.ClusterJFatalInternalException: Operation partitionKeySetPart is not supported for non-key fields.
at com.mysql.clusterj.core.metadata.AbstractDomainFieldHandlerImpl$27.partitionKeySetPart(AbstractDomainFieldHandlerImpl.java:2387)
at com.mysql.clusterj.core.metadata.AbstractDomainFieldHandlerImpl.partitionKeySetPart(AbstractDomainFieldHandlerImpl.java:392)
at com.mysql.clusterj.openjpa.NdbOpenJPADomainTypeHandlerImpl.createPartitionKey(NdbOpenJPADomainTypeHandlerImpl.java:578)
at com.mysql.clusterj.core.SessionImpl.setPartitionKey(SessionImpl.java:264)
at com.mysql.clusterj.core.SessionImpl.insert(SessionImpl.java:428)
at com.mysql.clusterj.openjpa.NdbOpenJPAStoreManager.flush(NdbOpenJPAStoreManager.java:375)
at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
Does anyone know the root cause and how to set the log level I want to get more log info from clusterJ jar file.
I use openjpa 2.3.0 + mysql-connector-5.1.31.
Thanks a lot.
Subject
Views
Written By
Posted
Failed to persist object through ClusterJPA
1677
July 07, 2014 01:57AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.