You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Alexey Kuznetsov (JIRA)" <ji...@apache.org> on 2015/03/24 16:30:53 UTC

[jira] [Created] (IGNITE-569) Exception with informative message should be thrown in case type registered in types metadata and indexed types

Alexey Kuznetsov created IGNITE-569:
---------------------------------------

             Summary: Exception with informative message should be thrown in case type registered in types metadata and indexed types
                 Key: IGNITE-569
                 URL: https://issues.apache.org/jira/browse/IGNITE-569
             Project: Ignite
          Issue Type: Bug
    Affects Versions: sprint-2
            Reporter: Alexey Kuznetsov
            Assignee: Sergi Vladykin
             Fix For: sprint-3


If user by mistake configure same type twice: first in type metadata and second in indexed types not very informative exception will be thrown.
Need to show message with informative message about exception reason.
{code}
[22:24:36,574][ERROR][main][IgniteKernal] Got exception while starting (will rollback startup routine).
class org.apache.ignite.IgniteCheckedException: Failed to register query type: TypeDescriptor [ccfg=CacheConfiguration [name=Person, rebalancePoolSize=2, rebalanceTimeout=10000, ttl=0, evictPlc=null, evictSync=false, evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000, evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true, dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC, storeFactory=org.apache.ignite.schema.Demo$H2DemoStoreFactory@48f2ed4a, loadPrevVal=false, aff=org.apache.ignite.cache.affinity.rendezvous.CacheRendezvousAffinityFunction@72b76539, cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY, backups=0, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC, rebalanceOrder=0, rebalanceBatchSize=524288, offHeapMaxMem=-1, swapEnabled=false, maxConcurrentAsyncOps=500, writeBehindEnabled=false, writeBehindFlushSize=10240, writeBehindFlushFreq=5000, writeBehindFlushThreadCnt=1, writeBehindBatchSize=512, memMode=ONHEAP_TIERED, affMapper=org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper@6656bc05, rebalanceDelay=0, rebalanceThrottle=0, interceptor=null, longQryWarnTimeout=3000, readFromBackup=true, nodeFilter=org.apache.ignite.configuration.CacheConfiguration$1@485220c0, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240, cpOnRead=true], name=Person, fields={Id=int, FirstName=class java.lang.String, LastName=class java.lang.String, Salary=double}, indexes={Id_idx=IndexDescriptor [type=SORTED]}, fullTextIdx=null, keyCls=class org.apache.ignite.schema.PersonKey, valCls=class org.apache.ignite.schema.Person, valTextIdx=false, registered=false]
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.registerType(IgniteH2Indexing.java:877)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.initializeCache(GridQueryProcessor.java:146)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:218)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:807)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:674)
	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:813)
	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1435)
	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1303)
	at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:882)
	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:481)
	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:462)
	at org.apache.ignite.Ignition.start(Ignition.java:306)
	at org.apache.ignite.schema.Demo.main(Demo.java:72)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.h2.jdbc.JdbcSQLException: Таблица "PERSON" уже существует
Table "PERSON" already exists; SQL statement:
CREATE TABLE "Person".Person (_key OTHER NOT NULL,_val OTHER,Id INT,FirstName VARCHAR,LastName VARCHAR,Salary DOUBLE) engine "org.apache.ignite.internal.processors.query.h2.opt.GridH2Table$Engine" [42101-175]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
	at org.h2.message.DbException.get(DbException.java:172)
	at org.h2.message.DbException.get(DbException.java:149)
	at org.h2.command.ddl.CreateTable.update(CreateTable.java:109)
	at org.h2.command.CommandContainer.update(CommandContainer.java:79)
	at org.h2.command.Command.executeUpdate(Command.java:253)
	at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:181)
	at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:156)
	at org.apache.ignite.internal.processors.query.h2.opt.GridH2Table$Engine.createTable(GridH2Table.java:614)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.createTable(IgniteH2Indexing.java:986)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.registerType(IgniteH2Indexing.java:870)
	... 17 more
[22:24:36,580][ERROR][main][IgniteKernal] Failed to pre-stop processor: GridProcessorAdapter []
java.lang.NullPointerException
	at org.apache.ignite.internal.processors.cache.GridCacheEventManager.isRecordable(GridCacheEventManager.java:342)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStop(GridCacheProcessor.java:968)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStop(GridCacheProcessor.java:781)
	at org.apache.ignite.internal.IgniteKernal.stop0(IgniteKernal.java:1712)
	at org.apache.ignite.internal.IgniteKernal.stop(IgniteKernal.java:1665)
	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:836)
	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1435)
	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1303)
	at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:882)
	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:481)
	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:462)
	at org.apache.ignite.Ignition.start(Ignition.java:306)
	at org.apache.ignite.schema.Demo.main(Demo.java:72)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
[22:24:36] Ignite node stopped wih ERRORS [uptime=00:00:04:416]
Exception in thread "main" class org.apache.ignite.IgniteException: Failed to register query type: TypeDescriptor [ccfg=CacheConfiguration [name=Person, rebalancePoolSize=2, rebalanceTimeout=10000, ttl=0, evictPlc=null, evictSync=false, evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000, evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true, dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC, storeFactory=org.apache.ignite.schema.Demo$H2DemoStoreFactory@48f2ed4a, loadPrevVal=false, aff=org.apache.ignite.cache.affinity.rendezvous.CacheRendezvousAffinityFunction@72b76539, cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY, backups=0, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC, rebalanceOrder=0, rebalanceBatchSize=524288, offHeapMaxMem=-1, swapEnabled=false, maxConcurrentAsyncOps=500, writeBehindEnabled=false, writeBehindFlushSize=10240, writeBehindFlushFreq=5000, writeBehindFlushThreadCnt=1, writeBehindBatchSize=512, memMode=ONHEAP_TIERED, affMapper=org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper@6656bc05, rebalanceDelay=0, rebalanceThrottle=0, interceptor=null, longQryWarnTimeout=3000, readFromBackup=true, nodeFilter=org.apache.ignite.configuration.CacheConfiguration$1@485220c0, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240, cpOnRead=true], name=Person, fields={Id=int, FirstName=class java.lang.String, LastName=class java.lang.String, Salary=double}, indexes={Id_idx=IndexDescriptor [type=SORTED]}, fullTextIdx=null, keyCls=class org.apache.ignite.schema.PersonKey, valCls=class org.apache.ignite.schema.Person, valTextIdx=false, registered=false]
	at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:660)
	at org.apache.ignite.Ignition.start(Ignition.java:309)
	at org.apache.ignite.schema.Demo.main(Demo.java:72)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to register query type: TypeDescriptor [ccfg=CacheConfiguration [name=Person, rebalancePoolSize=2, rebalanceTimeout=10000, ttl=0, evictPlc=null, evictSync=false, evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000, evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true, dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC, storeFactory=org.apache.ignite.schema.Demo$H2DemoStoreFactory@48f2ed4a, loadPrevVal=false, aff=org.apache.ignite.cache.affinity.rendezvous.CacheRendezvousAffinityFunction@72b76539, cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY, backups=0, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC, rebalanceOrder=0, rebalanceBatchSize=524288, offHeapMaxMem=-1, swapEnabled=false, maxConcurrentAsyncOps=500, writeBehindEnabled=false, writeBehindFlushSize=10240, writeBehindFlushFreq=5000, writeBehindFlushThreadCnt=1, writeBehindBatchSize=512, memMode=ONHEAP_TIERED, affMapper=org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper@6656bc05, rebalanceDelay=0, rebalanceThrottle=0, interceptor=null, longQryWarnTimeout=3000, readFromBackup=true, nodeFilter=org.apache.ignite.configuration.CacheConfiguration$1@485220c0, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240, cpOnRead=true], name=Person, fields={Id=int, FirstName=class java.lang.String, LastName=class java.lang.String, Salary=double}, indexes={Id_idx=IndexDescriptor [type=SORTED]}, fullTextIdx=null, keyCls=class org.apache.ignite.schema.PersonKey, valCls=class org.apache.ignite.schema.Person, valTextIdx=false, registered=false]
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.registerType(IgniteH2Indexing.java:877)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.initializeCache(GridQueryProcessor.java:146)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:218)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:807)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:674)
	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:813)
	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1435)
	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1303)
	at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:882)
	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:481)
	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:462)
	at org.apache.ignite.Ignition.start(Ignition.java:306)
	... 6 more
{code}



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