You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Valentin Kulichenko (JIRA)" <ji...@apache.org> on 2015/11/27 00:36:10 UTC

[jira] [Closed] (IGNITE-1988) NPE when explicit lock is acquired within a transaction

     [ https://issues.apache.org/jira/browse/IGNITE-1988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Valentin Kulichenko closed IGNITE-1988.
---------------------------------------

> NPE when explicit lock is acquired within a transaction
> -------------------------------------------------------
>
>                 Key: IGNITE-1988
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1988
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>            Reporter: Valentin Kulichenko
>            Assignee: Valentin Kulichenko
>            Priority: Critical
>             Fix For: 1.5
>
>
> This code:
> {code}
> try (Transaction tx = Ignition.ignite().transactions().txStart()) {
>     cache.lock(1).lock();
> }
> {code}
> result in the NPE:
> {code}
> Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture.addEntry(GridDhtColocatedLockFuture.java:294)
> 	at org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture.addLocalKey(GridDhtColocatedLockFuture.java:1172)
> 	at org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture.mapAsPrimary(GridDhtColocatedLockFuture.java:1118)
> 	at org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture.map(GridDhtColocatedLockFuture.java:736)
> 	at org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture.mapOnTopology(GridDhtColocatedLockFuture.java:677)
> 	at org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture.map(GridDhtColocatedLockFuture.java:629)
> 	at org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache.lockAllAsync(GridDhtColocatedCache.java:628)
> 	at org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheAdapter.lockAllAsync(GridDistributedCacheAdapter.java:117)
> 	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.lockAll(GridCacheAdapter.java:3150)
> 	at org.apache.ignite.internal.processors.cache.CacheLockImpl.lock(CacheLockImpl.java:72)
> 	at org.apache.ignite.examples.datagrid.CacheTransactionExample.deposit(CacheTransactionExample.java:92)
> 	at org.apache.ignite.examples.datagrid.CacheTransactionExample.main(CacheTransactionExample.java:70)
> {code}
> If such usage is invalid, proper exception should be thrown.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)