javax.persistence.RollbackException: java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST: biz.solidc.study.jpa.jpastudy.oneWay.oneToOne.Product@49bcb0d6[id=<null>,name=製品-A].

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

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via ne.jp by Unknown author, 1 year ago
java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST: biz.solidc.study.jpa.jpastudy.oneWay.oneToOne.Product@49bcb0d6[id=<null>,name=-A].
via Eclipse Bugzilla by michok34, 1 year ago
Exception [EclipseLink-34] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: This class does not define a public default constructor, or the constructor raised an
via Stack Overflow by Thufir
, 1 year ago
java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST: null.
via Stack Overflow by Donatas Veikutis
, 2 years ago
that partial changes have been written to the datastore but not rolled back (if inside external transaction), the only supported operations now are release, global transaction rollback, any non-object level query or SQLCall execution. The operation commit was attempted.
via Eclipse Bugzilla by shaun.smith, 1 year ago
Exception [EclipseLink-6150] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.ValidationException Exception Description: A null value can not be used as a key in a container of type [class org.eclipse.persistence.indirection.IndirectMap]. Ensure your key values for the objects of type [class model.Phone] can not be null.
via eclipse.org by Unknown author, 2 years ago
javax.persistence.OptimisticLockException: Exception [EclipseLink-5006] (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080319)): org.eclipse.persistence.exceptions.OptimisticLockException Exception Description: The object [Employee: 234772
javax.persistence.RollbackException: java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST: biz.solidc.study.jpa.jpastudy.oneWay.oneToOne.Product@49bcb0d6[id=<null>,name=製品-A].
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102)
at biz.solidc.study.jpa.jpastudy.oneWay.oneToOne.OneToOneTest.testInsert(OneToOneTest.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
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.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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