org.springframework.orm.jpa.JpaSystemException: Error in meta-data for net.opentemperament.entities.Comma.id: Cannot have a java.lang.Long primary key and be a child object (owning field is net.opentemperament.entities.Comma.alias).; nested exception is javax.persistence.PersistenceException: Error in meta-data for net.opentemperament.entities.Comma.id: Cannot have a java.lang.Long primary key and be a child object (owning field is net.opentemperament.entities.Comma.alias).

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Spring JIRA by Niklas Saers, 1 year ago
Error in meta-data for net.opentemperament.entities.Comma.id: Cannot have a java.lang.Long primary key and be a child object (owning field is net.opentemperament.entities.Comma.alias).; nested exception is javax.persistence.PersistenceException
via Spring JIRA by Niklas Saers, 1 year ago
Error in meta-data for net.opentemperament.entities.Comma.id: Cannot have a java.lang.Long primary key and be a child object (owning field is net.opentemperament.entities.Comma.alias).; nested exception is javax.persistence.PersistenceException
via btsoru.com by Unknown author, 2 years ago
org.hibernate.exception.ConstraintViolationException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
via calstatela.edu by Unknown author, 1 year ago
org.hibernate.exception.SQLGrammarException: could not extract ResultSet; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
via Stack Overflow by Nupin Pillai
, 2 years ago
org.hibernate.exception.ConstraintViolationException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
via Stack Overflow by JonnySnickers
, 2 years ago
org.hibernate.PersistentObjectException: detached entity passed to persist: mypackage.Role; nested exception is javax.persistence.PersistenceException: org.hibernate.PersistentObjectException: detached entity passed to persist: mypackage.Role
org.datanucleus.store.appengine.MetaDataValidator$DatastoreMetaDataException: Error in meta-data for net.opentemperament.entities.Comma.id: Cannot have a java.lang.Long primary key and be a child object (owning field is net.opentemperament.entities.Comma.alias).
at org.datanucleus.store.appengine.MetaDataValidator.checkForIllegalChildField(MetaDataValidator.java:376)
at org.datanucleus.store.appengine.MetaDataValidator.validateField(MetaDataValidator.java:226)
at org.datanucleus.store.appengine.MetaDataValidator.validateFields(MetaDataValidator.java:148)
at org.datanucleus.store.appengine.MetaDataValidator.validate(MetaDataValidator.java:121)
at org.datanucleus.store.appengine.DatastoreManager.validateMetaDataForClass(DatastoreManager.java:766)
at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProcess(DatastorePersistenceHandler.java:328)
at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:251)
at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(DatastorePersistenceHandler.java:240)
at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent(JDOStateManagerImpl.java:3185)
at org.datanucleus.state.JDOStateManagerImpl.flush(JDOStateManagerImpl.java:4513)
at org.datanucleus.ObjectManagerImpl.flushInternal(ObjectManagerImpl.java:2814)
at org.datanucleus.ObjectManagerImpl.flush(ObjectManagerImpl.java:2754)
at org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java:2893)
at org.datanucleus.TransactionImpl.internalPreCommit(TransactionImpl.java:369)
at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:256)
at org.datanucleus.jpa.EntityTransactionImpl.commit(EntityTransactionImpl.java:104)
at org.datanucleus.store.appengine.jpa.DatastoreEntityTransactionImpl.commit(DatastoreEntityTransactionImpl.java:55)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
at net.opentemperament.entities.Comma_Roo_Entity.ajc$interMethod$net_opentemperament_entities_Comma_Roo_Entity$net_opentemperament_entities_Comma$persist(Comma_Roo_Entity.aj:55)
at net.opentemperament.entities.Comma.persist(Comma.java:1)
at net.opentemperament.entities.Comma_Roo_Entity.ajc$interMethodDispatch1$net_opentemperament_entities_Comma_Roo_Entity$net_opentemperament_entities_Comma$persist(Comma_Roo_Entity.aj)
at net.opentemperament.entities.CommaDataOnDemand_Roo_DataOnDemand.ajc$interMethod$net_opentemperament_entities_CommaDataOnDemand_Roo_DataOnDemand$net_opentemperament_entities_CommaDataOnDemand$init(CommaDataOnDemand_Roo_DataOnDemand.aj:50)
at net.opentemperament.entities.CommaDataOnDemand.init(CommaDataOnDemand.java:1)
at net.opentemperament.entities.CommaDataOnDemand_Roo_DataOnDemand.ajc$interMethodDispatch1$net_opentemperament_entities_CommaDataOnDemand_Roo_DataOnDemand$net_opentemperament_entities_CommaDataOnDemand$init(CommaDataOnDemand_Roo_DataOnDemand.aj)
at net.opentemperament.entities.CommaDataOnDemand_Roo_DataOnDemand.ajc$interMethod$net_opentemperament_entities_CommaDataOnDemand_Roo_DataOnDemand$net_opentemperament_entities_CommaDataOnDemand$getRandomComma(CommaDataOnDemand_Roo_DataOnDemand.aj:37)
at net.opentemperament.entities.CommaDataOnDemand.getRandomComma(CommaDataOnDemand.java:1)
at net.opentemperament.entities.CommaDataOnDemand_Roo_DataOnDemand.ajc$interMethodDispatch1$net_opentemperament_entities_CommaDataOnDemand_Roo_DataOnDemand$net_opentemperament_entities_CommaDataOnDemand$getRandomComma(CommaDataOnDemand_Roo_DataOnDemand.aj)
at net.opentemperament.entities.CommaIntegrationTest_Roo_IntegrationTest.ajc$interMethod$net_opentemperament_entities_CommaIntegrationTest_Roo_IntegrationTest$net_opentemperament_entities_CommaIntegrationTest$testCountCommas(CommaIntegrationTest_Roo_IntegrationTest.aj:43)
at net.opentemperament.entities.CommaIntegrationTest.testCountCommas(CommaIntegrationTest.java:1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.