ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Konstantinov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-1996) NPE in case of not valid QueryEntity configuration
Date Fri, 27 Nov 2015 03:34:10 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15029418#comment-15029418
] 

Pavel Konstantinov commented on IGNITE-1996:
--------------------------------------------

I still dont understand what is wrong looking into stack trace
{code}
[10:24:02,173][SEVERE][ignite-#52%rest-ignite1753%][GridRestProcessor] Failed to handle request:
EXE
class org.apache.ignite.IgniteCheckedException: Failed to load cache: ignite1753
        at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
        at org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
        at org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
        at org.apache.ignite.internal.processors.rest.handlers.task.GridTaskCommandHandler$2.apply(GridTaskCommandHandler.java:263)
        at org.apache.ignite.internal.processors.rest.handlers.task.GridTaskCommandHandler$2.apply(GridTaskCommandHandler.java:257)
        at org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java:262)
        at org.apache.ignite.internal.util.future.GridFutureAdapter.listen(GridFutureAdapter.java:225)
        at org.apache.ignite.internal.processors.rest.handlers.task.GridTaskCommandHandler.handleAsyncUnsafe(GridTaskCommandHandler.java:257)
        at org.apache.ignite.internal.processors.rest.handlers.task.GridTaskCommandHandler.handleAsync(GridTaskCommandHandler.java:163)
        at org.apache.ignite.internal.processors.rest.GridRestProcessor.handleRequest(GridRestProcessor.java:261)
        at org.apache.ignite.internal.processors.rest.GridRestProcessor.access$100(GridRestProcessor.java:84)
        at org.apache.ignite.internal.processors.rest.GridRestProcessor$2.body(GridRestProcessor.java:150)
        at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.cache.integration.CacheLoaderException: Failed to load cache: ignite1753
        at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:875)
        at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:484)
        at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:515)
        at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.localLoadCache(IgniteCacheProxy.java:387)
        at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5757)
        at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5704)
        at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1789)
        at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:509)
        at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6397)
        at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:503)
        at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:456)
        ... 4 more
Caused by: class org.apache.ignite.binary.BinaryObjectException: Wrong value has been set
[typeName=Comalgorithm, fieldName=algcomment, fieldType=String, assignedValueType=Object]
        at org.apache.ignite.internal.portable.builder.BinaryObjectBuilderImpl.serializeTo(BinaryObjectBuilderImpl.java:334)
        at org.apache.ignite.internal.portable.builder.BinaryObjectBuilderImpl.build(BinaryObjectBuilderImpl.java:187)
        at org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore.buildBinaryObject(CacheJdbcPojoStore.java:258)
        at org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore.buildObject(CacheJdbcPojoStore.java:133)
        at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore$LoadCacheCustomQueryWorker.call(CacheAbstractJdbcStore.java:1931)
        at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore$LoadCacheCustomQueryWorker.call(CacheAbstractJdbcStore.java:1884)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        ... 3 more
{code}

I'm expected 'class not found' exception with full class name, but see only short class name
{code}
typeName=Comalgorithm
{code}

This class name has absolutely correct name.
In my case the problem with package name that I set in configuration (incorrect package name)
{code}
<property name="keyType" value="com.gridgain.eng-qa.model.ComalgorithmKey"/>
<property name="valueType" value="com.gridgain.eng-qa.model.Comalgorithm"/>
{code}

> NPE in case of not valid QueryEntity configuration
> --------------------------------------------------
>
>                 Key: IGNITE-1996
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1996
>             Project: Ignite
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5
>            Reporter: Alexey Kuznetsov
>            Assignee: Pavel Konstantinov
>             Fix For: 1.5
>
>
> In case if user specified in xml configuration not existing value for QueryEntity.valueType
that GridQueryProcessor failed with NPE, but should throw appropriate exception with name
of invalid class name.
> {code}
> Caused by: java.lang.NullPointerException
> 	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$DBTypeEnum.fromClass(IgniteH2Indexing.java:1704)
> 	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.dbTypeFromClass(IgniteH2Indexing.java:1175)
> 	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.createTable(IgniteH2Indexing.java:1146)
> 	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.registerType(IgniteH2Indexing.java:1050)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor.initializeCache(GridQueryProcessor.java:253)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:374)
> 	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1015)
> 	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:786)
> 	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:944)
> {code}



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

Mime
View raw message