ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanislav Lukyanov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-8470) NPE when starting LOCAL cache on a client with no data regions
Date Fri, 11 May 2018 11:57:00 GMT
Stanislav Lukyanov created IGNITE-8470:
------------------------------------------

             Summary: NPE when starting LOCAL cache on a client with no data regions
                 Key: IGNITE-8470
                 URL: https://issues.apache.org/jira/browse/IGNITE-8470
             Project: Ignite
          Issue Type: Bug
            Reporter: Stanislav Lukyanov


If a LOCAL cache is started on a client and the client has no data regions configured then
an NPE is thrown with no error message:

{code}
class org.apache.ignite.IgniteCheckedException: null
	at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7284)
	at org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:259)
	at org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:232)
	at org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:159)
	at org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:151)
	at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager.onKernalStart(GridCachePartitionExchangeManager.java:632)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:829)
	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1043)
	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1973)
	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1716)
	at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1144)
	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:642)
	at org.apache.ignite.testframework.junits.GridAbstractTest.startGrid(GridAbstractTest.java:849)
	at org.apache.ignite.testframework.junits.GridAbstractTest.startGrid(GridAbstractTest.java:798)
	at org.apache.ignite.internal.processors.cache.IgniteCacheOffheapIndexScanTest.beforeTestsStarted(IgniteCacheOffheapIndexScanTest.java:78)
	at org.apache.ignite.testframework.junits.GridAbstractTest.setUp(GridAbstractTest.java:599)
	at org.apache.ignite.testframework.junits.common.GridCommonAbstractTest.setUp(GridCommonAbstractTest.java:485)
	at junit.framework.TestCase.runBare(TestCase.java:139)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:129)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
	at org.apache.ignite.internal.processors.cache.CacheGroupContext.<init>(CacheGroupContext.java:207)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCacheGroup(GridCacheProcessor.java:1983)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1881)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:1773)
	at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.initCachesOnLocalJoin(GridDhtPartitionsExchangeFuture.java:784)
	at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:666)
	at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2344)
	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
	at java.lang.Thread.run(Thread.java:748)
{code}

If assertions are enabled (-ea), an AssertionError is thrown instead:
{code}
java.lang.AssertionError
	at org.apache.ignite.internal.processors.cache.CacheGroupContext.<init>(CacheGroupContext.java:185)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCacheGroup(GridCacheProcessor.java:1983)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1881)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:1773)
	at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.initCachesOnLocalJoin(GridDhtPartitionsExchangeFuture.java:784)
	at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:666)
	at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2344)
	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
	at java.lang.Thread.run(Thread.java:748)
{code}

Need to replace these errors with a validation and a meaningful error message.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message