]
Sebastian Łaskawiec closed ISPN-1969.
-------------------------------------
I assume it's done right? Closing...
Nullpointer Exception when NON_TRANSACTIONAL caching
----------------------------------------------------
Key: ISPN-1969
URL:
https://issues.jboss.org/browse/ISPN-1969
Project: Infinispan
Issue Type: Bug
Components: Configuration, Remote Protocols, Spring Integration
Affects Versions: 5.1.3.FINAL
Reporter: Roland Csupor
Assignee: Galder Zamarreño
Priority: Critical
Labels: NON_TRANSACTIONAL, nullpointerexception, spring
Fix For: 5.1.5.FINAL, 5.2.0.ALPHA1, 5.2.0.Final
Attachments: InfinispanSpringCacheTest.java,
infinispanSpringCacheTest-config-infinispan.xml, infinispanSpringCacheTest-config.xml,
pom.xml
I am using infinispan mixed. Non transactional spring cache and transactional L1 cache.
Spring cache region config looks like this:
{noformat}
<namedCache name="springCache">
<transaction transactionMode="NON_TRANSACTIONAL"/>
<eviction maxEntries="100" strategy="NONE" />
<expiration lifespan="3600000" wakeUpInterval="600000" />
<invocationBatching enabled="false" />
<storeAsBinary enabled="true" storeKeysAsBinary="true"
storeValuesAsBinary="true"/>
</namedCache>
{noformat}
My global configuration is:
{noformat}
<global>
<evictionScheduledExecutor
factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
<properties>
<property name="threadNamePrefix" value="EvictionThread"
/>
</properties>
</evictionScheduledExecutor>
<globalJmxStatistics allowDuplicateDomains="true"
enabled="true" jmxDomain="org.infinispan"
cacheManagerName="SampleCacheManager" />
</global>
{noformat}
And default is:
{noformat}
<default>
<locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="5000" useLockStriping="false" />
<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
syncRollbackPhase="false" syncCommitPhase="false"
useEagerLocking="false"
eagerLockSingleNode="false" lockingMode="OPTIMISTIC"
autoCommit="false" transactionMode="TRANSACTIONAL" />
<jmxStatistics enabled="true" />
<invocationBatching enabled="true" />
</default>
{noformat}
Actually I get NullPointerException:
{noformat}
java.lang.NullPointerException: null
at
org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:72)
~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at
org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:95)
~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at
org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:60)
~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345)
~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at org.infinispan.CacheImpl.get(CacheImpl.java:272)
~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at org.infinispan.CacheImpl.get(CacheImpl.java:264)
~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at org.infinispan.spring.provider.SpringCache.get(SpringCache.java:74)
~[infinispan-spring-5.1.3.FINAL.jar:5.1.3.FINAL]
at
org.springframework.cache.interceptor.CacheAspectSupport.inspectCacheables(CacheAspectSupport.java:310)
~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at
org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:198)
~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at
org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:66)
~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
{noformat}