Hi

AM using 2.4

My delete statement is failing when I pass multiple keys, table has a
composite key with 3 columns. 

Have mentioned the table structure along with a failed query and successful
query and the error I am seeing the 

Here is the table created Java API

CREATE TABLE MapLonglistCache.MAP_LONGLIST (
        ENTITY_ID VARCHAR,
        MAPPING_ID_LIST VARCHAR,
        RELATIONSHIP VARCHAR,
        UPDATEDDATETIME TIMESTAMP,
        UPDATEDBY VARCHAR,
        SEQUENCE_NO VARCHAR,
        TUPLE_COUNT VARCHAR,
        CONSTRAINT PK_MapLonglistCache_MAP_LONGLIST PRIMARY KEY
(ENTITY_ID,RELATIONSHIP,SEQUENCE_NO)
) ;
CREATE INDEX MAP_LONGLIST_PK ON MapLonglistCache.MAP_LONGLIST (RELATIONSHIP
DESC,SEQUENCE_NO DESC) ;

Here is query which is failing

DELETE FROM "MapLonglistCache".MAP_LONGLIST  WHERE ENTITY_ID IN
('12345','12345') 
AND RELATIONSHIP  IN ('OutageID_ServiceIDs','OutageID_ServiceIDs') 
AND SEQUENCE_NO IN ('6','7')

And, when I pass only one key, it seems to be working like 

DELETE FROM "MapLonglistCache".MAP_LONGLIST  WHERE ENTITY_ID IN ('12345') 
AND RELATIONSHIP  IN ('OutageID_ServiceIDs') 
AND SEQUENCE_NO IN ('6')

So is it, that delete will not work with IN clause which has a composite
key. 

And I do not have POJO classes on the classpath, not sure how it is trying
load the key class "'com.jio.digitalapi.edif.customer.model.MapLonglistKey"


SEVERE: Failed to execute SQL query [reqId=0, req=JdbcQueryExecuteRequest
[schemaName=PUBLIC, pageSize=1024, maxRows=0, sqlQry=DELETE FROM
"MapLonglistCache".MAP_LONGLIST  WHERE ENTITY_ID IN ('12345','12345')
AND RELATIONSHIP  IN ('OutageID_ServiceIDs','OutageID_ServiceIDs')
AND SEQUENCE_NO IN ('6','7'), args=[], stmtType=ANY_STATEMENT_TYPE]]
class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed
to process key 'com.jio.digitalapi.edif.customer.model.MapLonglistKey
[idHash=15804671, hash=156851519, entityId=12345,
relationship=OutageID_ServiceIDs, sequenceNo=7]'
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doDelete(DmlStatementsProcessor.java:681)
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.processDmlSelectResult(DmlStatementsProcessor.java:582)
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:534)
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:160)
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:334)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.doRunPrepared(IgniteH2Indexing.java:1613)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1577)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2039)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2034)
        at
org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2555)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2048)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:1979)
        at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:310)
        at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:169)
        at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:148)
        at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:41)
        at
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
        at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
        at
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: Failed to process key
'com.jio.digitalapi.edif.customer.model.MapLonglistKey [idHash=15804671,
hash=156851519, entityId=12345, relationship=OutageID_ServiceIDs,
sequenceNo=7]'
        at
org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode.createJdbcSqlException(IgniteQueryErrorCode.java:116)
        at
org.apache.ignite.internal.processors.query.h2.dml.DmlBatchSender.splitErrors(DmlBatchSender.java:262)
        at
org.apache.ignite.internal.processors.query.h2.dml.DmlBatchSender.processPage(DmlBatchSender.java:228)
        at
org.apache.ignite.internal.processors.query.h2.dml.DmlBatchSender.sendBatch(DmlBatchSender.java:178)
        at
org.apache.ignite.internal.processors.query.h2.dml.DmlBatchSender.flush(DmlBatchSender.java:129)
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doDelete(DmlStatementsProcessor.java:663)
        ... 24 more
Caused by: javax.cache.processor.EntryProcessorException: class
org.apache.ignite.IgniteCheckedException: null
        at
org.apache.ignite.internal.processors.cache.CacheInvokeResult.get(CacheInvokeResult.java:102)
        at
org.apache.ignite.internal.processors.query.h2.dml.DmlBatchSender.splitErrors(DmlBatchSender.java:259)
        ... 28 more
Caused by: class org.apache.ignite.IgniteCheckedException: null
        at
org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7244)
        at
org.apache.ignite.internal.processors.cache.GridCacheContext.validateKeyAndValue(GridCacheContext.java:1832)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateWithBatch(GridDhtAtomicCache.java:2074)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.update(GridDhtAtomicCache.java:1865)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1736)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:1628)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.processNearAtomicUpdateRequest(GridDhtAtomicCache.java:3055)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$400(GridDhtAtomicCache.java:130)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$5.apply(GridDhtAtomicCache.java:266)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$5.apply(GridDhtAtomicCache.java:261)
        at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:1060)
        at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:579)
        at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:378)
        at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:304)
        at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$100(GridCacheIoManager.java:99)
        at
org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:293)
        at
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1555)
        at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1183)
        at
org.apache.ignite.internal.managers.communication.GridIoManager.access$4200(GridIoManager.java:126)
        at
org.apache.ignite.internal.managers.communication.GridIoManager$9.run(GridIoManager.java:1090)
        at
org.apache.ignite.internal.util.StripedExecutor$Stripe.run(StripedExecutor.java:505)
        ... 1 more
Caused by: java.lang.NullPointerException
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.typeByValue(GridQueryProcessor.java:1901)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.validateKeyAndValue(GridQueryProcessor.java:2755)
        at
org.apache.ignite.internal.processors.cache.GridCacheContext.validateKeyAndValue(GridCacheContext.java:1829)
        ... 20 more



Thanks
Naveen



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to