[
https://issues.jboss.org/browse/ISPN-9677?page=com.atlassian.jira.plugin....
]
Galder Zamarreño commented on ISPN-9677:
----------------------------------------
Hibernate local simple tutorial output:
{code}
[INFO] --- exec-maven-plugin:1.6.0:exec (default-cli) @
infinispan-simple-tutorials-hibernate-cache-local ---
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core
to the classpath. Using SimpleLogger to log to the console...
Event entity cache puts: 3 (expected 3)
Found entity: Event{id=1, name='Caught a pokemon!', time=2018-11-05T14:03:23.155}
Event entity cache hits: 1 (expected 1)
Updated entity: Event{id=1, name='Caught a Snorlax!!',
time=2018-11-05T14:03:23.155}
Event entity cache hits: 1 (expected 1)
Event entity cache puts: 1 (expected 1)
Found entity: Event{id=1, name='Caught a Snorlax!!',
time=2018-11-05T14:03:23.155}
Event entity cache hits: 1 (expected 1)
Found entity: Event{id=1, name='Caught a Snorlax!!',
time=2018-11-05T14:03:23.155}
Event entity cache miss: 1 (expected 1)
Event entity cache puts: 1 (expected 1)
Event entity cache hits: 1 (expected 1)
Queried events: [Event{id=2, name='Hatched an egg', time=2018-11-05T14:03:23.168},
Event{id=3, name='Became a gym leader', time=2018-11-05T14:03:23.169}]
Query cache miss: 1 (expected 1)
Query cache put: 1 (expected 1)
Queried events: [Event{id=2, name='Hatched an egg', time=2018-11-05T14:03:23.168},
Event{id=3, name='Became a gym leader', time=2018-11-05T14:03:23.169}]
Event entity cache hits: 0 (expected 2)
Exception in thread "main" java.lang.AssertionError: Expected: 2, actual: 0
at
org.infinispan.tutorial.simple.hibernate.cache.local.InfinispanHibernateCacheLocal.printfAssert(InfinispanHibernateCacheLocal.java:263)
at
org.infinispan.tutorial.simple.hibernate.cache.local.InfinispanHibernateCacheLocal.main(InfinispanHibernateCacheLocal.java:95)
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
{code}
Non-transactional queries don't update the query cache
------------------------------------------------------
Key: ISPN-9677
URL:
https://issues.jboss.org/browse/ISPN-9677
Project: Infinispan
Issue Type: Bug
Components: Hibernate Cache
Affects Versions: 9.4.1.Final
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
Priority: Major
Fix For: 9.4.2.Final
This is affecting the Hibernate second-level cache simple tutorials where queries are
executed outside transactions.
The problem is that the new integration for the query results (result of ISPN-9075) does
not verify if there's an on-going transaction before registering a transaction
completed synchronization where the query cache is updated.
As a result, when a non-transactional query happens, the transaction synchronization
callback does not happen and the query cache is not updated.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)