[JBoss JIRA] (ISPN-7783) ClassCastException in case of configured read-through cache with some cache loader
by Roman Chigvintsev (JIRA)
[ https://issues.jboss.org/browse/ISPN-7783?page=com.atlassian.jira.plugin.... ]
Roman Chigvintsev updated ISPN-7783:
------------------------------------
Steps to Reproduce:
*Configure cache in invalidation mode in XML:*
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns="urn:infinispan:config:8.2">
<cache-container default-cache="default">
<transport cluster="jcache-cluster"/>
<invalidation-cache-configuration name="user" mode="SYNC" statistics="true"/>
</cache-container>
</infinispan>
{code}
*Provide cache loader configuration through JCache API:*
{code:java}
new MutableConfiguration<String, User>()
.setReadThrough(true).setStoreByValue(true)
.setCacheLoaderFactory(FactoryBuilder.factoryOf(UserCacheLoader.class));
{code}
Cache loader can be trivial:
{code:java}
public class UserCacheLoader implements CacheLoader<String, User> {
@Override
public User load(String username) {
return new User(username);
}
}
{code}
*Load serveral users into the cache.*
*Call `javax.cache.Cache.removeAll()` method on the cache instance.*
was:
# Configure cache in invalidation mode in XML:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns="urn:infinispan:config:8.2">
<cache-container default-cache="default">
<transport cluster="jcache-cluster"/>
<invalidation-cache-configuration name="user" mode="SYNC" statistics="true"/>
</cache-container>
</infinispan>
{code}
# Provide cache loader configuration through JCache API:
{code:java}
new MutableConfiguration<String, User>()
.setReadThrough(true).setStoreByValue(true)
.setCacheLoaderFactory(FactoryBuilder.factoryOf(UserCacheLoader.class));
{code}
Cache loader can be trivial:
{code:java}
public class UserCacheLoader implements CacheLoader<String, User> {
@Override
public User load(String username) {
return new User(username);
}
}
{code}
# Load serveral users into the cache.
# Call `javax.cache.Cache.removeAll()` method on the cache instance.
> ClassCastException in case of configured read-through cache with some cache loader
> ----------------------------------------------------------------------------------
>
> Key: ISPN-7783
> URL: https://issues.jboss.org/browse/ISPN-7783
> Project: Infinispan
> Issue Type: Bug
> Components: JCache
> Affects Versions: 8.2.1.Final, 9.0.0.Final
> Reporter: Roman Chigvintsev
>
> When cache is configured through JCache API as a read-through cache with some cache loader Infinispan puts cache values provided by that loader in place of keys. It causes `java.lang.ClassCastException` after calling of `javax.cache.Cache.removeAll` method. Iteration on cache also turns out to be broken.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (ISPN-7783) ClassCastException in case of configured read-through cache with some cache loader
by Roman Chigvintsev (JIRA)
Roman Chigvintsev created ISPN-7783:
---------------------------------------
Summary: ClassCastException in case of configured read-through cache with some cache loader
Key: ISPN-7783
URL: https://issues.jboss.org/browse/ISPN-7783
Project: Infinispan
Issue Type: Bug
Components: JCache
Affects Versions: 9.0.0.Final, 8.2.1.Final
Reporter: Roman Chigvintsev
When cache is configured through JCache API as a read-through cache with some cache loader Infinispan puts cache values provided by that loader in place of keys. It causes `java.lang.ClassCastException` after calling of `javax.cache.Cache.removeAll` method. Iteration on cache also turns out to be broken.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (ISPN-7782) Generate documentation code snippets from testsuite
by Jiří Holuša (JIRA)
Jiří Holuša created ISPN-7782:
---------------------------------
Summary: Generate documentation code snippets from testsuite
Key: ISPN-7782
URL: https://issues.jboss.org/browse/ISPN-7782
Project: Infinispan
Issue Type: Enhancement
Components: Documentation-Core
Affects Versions: 9.0.0.Final
Reporter: Jiří Holuša
Assignee: Jiří Holuša
The aim is to have code snippets in the documentation generated right from the testsuite to ensure that they are always correct.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (ISPN-7579) SimpleDateFormat is not thread safe
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-7579?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-7579:
-----------------------------------------------
Vojtech Juranek <vjuranek(a)redhat.com> changed the Status of [bug 1431965|https://bugzilla.redhat.com/show_bug.cgi?id=1431965] from ON_QA to VERIFIED
> SimpleDateFormat is not thread safe
> -----------------------------------
>
> Key: ISPN-7579
> URL: https://issues.jboss.org/browse/ISPN-7579
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Protocols
> Affects Versions: 9.0.0.CR2
> Reporter: Tristan Tarrant
> Assignee: Tristan Tarrant
> Fix For: 9.0.0.CR4
>
>
> {{org.infinispan.rest.Server}} has a static field of {{DatePatternRfc1123LocaleUS}}, wihich is an instance of {{SimpleDateFormat}}, and is causing the following error during a load test.
> {code}
> 2017-03-03 15:57:55,939 ERROR [org.jboss.resteasy.plugins.server.netty.i18n] (nioEventLoopGroup-6-8) RESTEASY018525: Unexpected: org.jboss.resteasy.spi.UnhandledException: java.lang.ArrayIndexOutOfBoundsException: -2147483648
> at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)
> at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)
> at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:168)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:411)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202)
> at org.jboss.resteasy.plugins.server.netty.RequestDispatcher.service(RequestDispatcher.java:83)
> at org.jboss.resteasy.plugins.server.netty.RequestHandler.channelRead0(RequestHandler.java:54)
> at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292)
> at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:32)
> at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:283)
> at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:374)
> at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
> at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -2147483648
> at java.util.Calendar.getDisplayName(Calendar.java:2114)
> at java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:1125)
> at java.text.SimpleDateFormat.format(SimpleDateFormat.java:966)
> at java.text.SimpleDateFormat.format(SimpleDateFormat.java:936)
> at java.text.DateFormat.format(DateFormat.java:345)
> at org.infinispan.rest.Server.org$infinispan$rest$Server$$formatDate(Server.scala:222)
> at org.infinispan.rest.Server.org$infinispan$rest$Server$$getMimeEntry(Server.scala:140)
> at org.infinispan.rest.Server$$anonfun$getEntry$1$$anonfun$apply$10.apply(Server.scala:98)
> at org.infinispan.rest.Server$$anonfun$getEntry$1$$anonfun$apply$10.apply(Server.scala:96)
> at org.infinispan.rest.Server.org$infinispan$rest$Server$$ensureFreshEnoughEntry(Server.scala:111)
> at org.infinispan.rest.Server$$anonfun$getEntry$1.apply(Server.scala:95)
> at org.infinispan.rest.Server$$anonfun$getEntry$1.apply(Server.scala:89)
> at org.infinispan.rest.Server.protectCacheNotFound(Server.scala:498)
> at org.infinispan.rest.Server.getEntry(Server.scala:89)
> at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395)
> ... 12 more
> {code}
> A similar issue is found here:
> https://github.com/rhuss/jolokia/issues/184
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (ISPN-5699) Simplify entry wrapping
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-5699?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-5699:
-----------------------------------------------
Vojtech Juranek <vjuranek(a)redhat.com> changed the Status of [bug 1388562|https://bugzilla.redhat.com/show_bug.cgi?id=1388562] from ON_QA to VERIFIED
> Simplify entry wrapping
> -----------------------
>
> Key: ISPN-5699
> URL: https://issues.jboss.org/browse/ISPN-5699
> Project: Infinispan
> Issue Type: Task
> Components: Core
> Affects Versions: 8.0.0.CR1
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Fix For: 8.1.0.Alpha2, 8.1.0.Final
>
>
> The entry wrapping should be more or less the same for all write commands.
> Currently we have some optimizations to skip wrapping in some cases, in the first phase we should probably keep them:
> * Non-repeatable reads don't store anything in the context if the value is null
> * Replace and remove store a null entry in the context
> * PutForExternalRead doesn't store anything in the context if the value is non-null
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months