row exists in DB but EntityNotFoundException thrown with message No row with the given identifier exists: this instance does not yet exist as a row in the database

Description

When the persist occurs prior to an active transaction, and is then persisted again along with other related (by foreign key) entities inside of an active transaction, the compressed state is 17, missing bit 13 (in database).

Stacktrace from test case.

javax.persistence.EntityNotFoundException: No row with the given identifier exists: [this instance does not yet exist as a row in the database#1] at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:133) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188) at org.hibernate.internal.SessionImpl.fireRefresh(SessionImpl.java:1339) at org.hibernate.internal.SessionImpl.refresh(SessionImpl.java:1280) at org.hibernate.bugs.JPAUnitTestCase.hhh123Test2(JPAUnitTestCase.java:105) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)

Attachments

1
  • 08 Apr 2020, 01:57 PM

Activity

Show:

IT Support April 8, 2020 at 1:57 PM

{noformat}

$ git log -1
commit 307c0cc692f5c72ad9fba74eaff100ad67564853 (HEAD -> HHH-13941, origin/master, origin/HEAD, master)
Author: Yoann Rodière yoann@hibernate.org
Date: Thu Sep 19 08:55:33 2019 +0200

[HSEARCH] Remove garbage from a POM file

$ git status
On branch HHH-13941
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)

modified: src/test/java/org/hibernate/bugs/JPAUnitTestCase.java modified: src/test/resources/META-INF/persistence.xml

Untracked files:
(use "git add <file>..." to include in what will be committed)

../HHH13941.tgz src/test/java/us/

no changes added to commit (use "git add" and/or "git commit -a")

{noformat}

Details

Assignee

Reporter

Components

Affects versions

Priority

Created April 8, 2020 at 1:53 PM
Updated April 8, 2020 at 1:57 PM