[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3478?page=c...
]
Guenther Demetz commented on HHH-3478:
--------------------------------------
Hi Gail Badner,
this bugfix, contrary as supposed, seems not have been ported to the trunc through
HHH-5220.
I tested today versions 3.6.0 Beta1 and 3.6.0. Beta2 and the bug is still present in this
versions.
Only in 3.5.2 it results fixed. Can you please check?
Many thanks in advance
best regards
G.D.
StandardQueryCache.get() does not handle EntityNotFoundException for
natural key lookups
-----------------------------------------------------------------------------------------
Key: HHH-3478
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3478
Project: Hibernate Core
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.3.0.SP1, 3.5.1
Environment: Java 1.5, Maven dependencies:
[INFO] (root)
[INFO] | \- org.hibernate:hibernate-validator:jar:3.1.0.GA:compile
[INFO] +- commons-codec:commons-codec:jar:1.3:compile
[INFO] +- javax.persistence:persistence-api:jar:1.0:compile
[INFO] +- org.hibernate:hibernate-core:jar:3.3.0.SP1:compile
[INFO] | +- antlr:antlr:jar:2.7.6:compile
[INFO] | +- commons-collections:commons-collections:jar:3.1:compile
[INFO] | \- dom4j:dom4j:jar:1.6.1:compile
[INFO] | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- org.hibernate:hibernate-annotations:jar:3.4.0.GA:compile
[INFO] | \- org.hibernate:ejb3-persistence:jar:1.0.2.GA:compile
[INFO] +- org.hibernate:hibernate-commons-annotations:jar:3.3.0.ga:compile
[INFO] | \- org.hibernate:hibernate:jar:3.2.1.ga:compile
[INFO] | +- net.sf.ehcache:ehcache:jar:1.2.3:compile
[INFO] | +- asm:asm-attrs:jar:1.5.3:compile
[INFO] | +- cglib:cglib:jar:2.1_3:compile
[INFO] | \- asm:asm:jar:1.5.3:compile
[INFO] +- org.hibernate:hibernate-entitymanager:jar:3.4.0.GA:compile
[INFO] | \- javassist:javassist:jar:3.4.GA:compile
[INFO] +- javax.transaction:jta:jar:1.0.1B:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.5.2:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.5.2:compile
[INFO] +- hsqldb:hsqldb:jar:1.8.0.10:test
[INFO] \- junit:junit:jar:4.4:test
Reporter: Elias Ross
Assignee: Gail Badner
Fix For: 3.5.2
Attachments: Dummy.java, DummyTest.java, persistence.xml, query-patch.txt
See attached test case and entity.
Current Result:
javax.persistence.EntityNotFoundException: Unable to find com.autodesk.lbs.cs.Dummy with
id 1
at
org.hibernate.ejb.Ejb3Configuration$Ejb3EntityNotFoundDelegate.handleEntityNotFound(Ejb3Configuration.java:113)
at
org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:171)
at
org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:223)
at
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:905)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:873)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:590)
at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:219)
at org.hibernate.cache.StandardQueryCache.get(StandardQueryCache.java:155)
at org.hibernate.loader.Loader.getResultFromQueryCache(Loader.java:2184)
at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2147)
at org.hibernate.loader.Loader.list(Loader.java:2117)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:328)
at com.autodesk.lbs.cs.DummyTest.naturalKeyCachedQuery(DummyTest.java:69)
at com.autodesk.lbs.cs.DummyTest.naturalKeyCachedQuery(DummyTest.java:61)
at com.autodesk.lbs.cs.DummyTest.testQuery(DummyTest.java:49)
It's expected that a cache invalidation occurs with an entity's natural key when
it is removed.
I'll investigate a solution.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira