You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by rishi007bansod <ri...@gmail.com> on 2016/12/22 09:35:13 UTC
Error while writethrough operation in Ignite
I am inserting data into table and write through policy is used to write back
result to Oracle DB. But I am getting following error
Exception in thread "main" javax.cache.integration.CacheWriterException:
class
org.apache.ignite.internal.processors.cache.CachePartialUpdateCheckedException:
Failed to update keys (retry update if possible).: [NewOrders5Key
[noOId=3002, noDId=3, noWId=3]]
at
org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1485)
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.cacheException(IgniteCacheProxy.java:2021)
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.put(IgniteCacheProxy.java:1221)
at test370.new_order(test370.java:718)
at test370.main(test370.java:434)
Caused by: class
org.apache.ignite.internal.processors.cache.CachePartialUpdateCheckedException:
Failed to update keys (retry update if possible).: [NewOrders5Key
[noOId=3002, noDId=3, noWId=3]]
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.onResult(GridNearAtomicSingleUpdateFuture.java:232)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture$3.apply(GridNearAtomicSingleUpdateFuture.java:455)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture$3.apply(GridNearAtomicSingleUpdateFuture.java:453)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1744)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:1490)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.mapSingle(GridNearAtomicSingleUpdateFuture.java:452)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.map(GridNearAtomicSingleUpdateFuture.java:569)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.mapOnTopology(GridNearAtomicSingleUpdateFuture.java:441)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture.map(GridNearAtomicAbstractUpdateFuture.java:207)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$22.apply(GridDhtAtomicCache.java:1015)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$22.apply(GridDhtAtomicCache.java:1013)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.asyncOp(GridDhtAtomicCache.java:711)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAsync0(GridDhtAtomicCache.java:1013)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.putAsync0(GridDhtAtomicCache.java:483)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAsync(GridCacheAdapter.java:2541)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.put(GridDhtAtomicCache.java:460)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.put(GridCacheAdapter.java:2215)
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.put(IgniteCacheProxy.java:1214)
... 2 more
Suppressed: class org.apache.ignite.IgniteCheckedException: Failed to
update keys on primary node.
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateResponse.addFailedKey(GridNearAtomicUpdateResponse.java:350)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateSingle(GridDhtAtomicCache.java:2393)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1652)
... 16 more
Suppressed: class org.apache.ignite.IgniteCheckedException: Failed to
write entry to database [table=C##TPCCTEST.NEW_ORDERS5, entry=Entry
[key=NewOrders5Key [noOId=3002, noDId=3, noWId=3], val=NewOrders5
[noOId=3002, noDId=3, noWId=3]]]
at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.put(GridCacheStoreManagerAdapter.java:583)
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry.innerUpdate(GridCacheMapEntry.java:2425)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateSingle(GridDhtAtomicCache.java:2252)
... 17 more
Caused by: javax.cache.integration.CacheWriterException: Failed to write
entry to database [table=C##TPCCTEST.NEW_ORDERS5, entry=Entry
[key=NewOrders5Key [noOId=3002, noDId=3, noWId=3], val=NewOrders5
[noOId=3002, noDId=3, noWId=3]]]
at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.write(CacheAbstractJdbcStore.java:1020)
at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.put(GridCacheStoreManagerAdapter.java:575)
... 19 more
Caused by: java.sql.SQLSyntaxErrorException: ORA-00927: missing equal sign
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1017)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:566)
at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)
at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:58)
at
oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:943)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1075)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3820)
at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3897)
at
oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1361)
at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.write(CacheAbstractJdbcStore.java:990)
... 20 more
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Error while writethrough operation in Ignite
Posted by vkulichenko <va...@gmail.com>.
Dmitry,
I probably do not correctly understand what is wrong, but it feels like
something needs to be fixed anyway. If you agree, can you please move this
to dev list?
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696p9786.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Error while writethrough operation in Ignite
Posted by dkarachentsev <dk...@gridgain.com>.
Val,
Of course it's possible, but why Ignite should restrict this case? Why not
to build such update request:
UPDATE table_name SET col1=1, col2=2, col3=3 WHERE (col1=1 AND col2=1 AND
col3=1) ?
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696p9773.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Error while writethrough operation in Ignite
Posted by vkulichenko <va...@gmail.com>.
Dmitry,
Can this be detected and reported with a better exception? Sounds like a
usability issue to me.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696p9760.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Error while writethrough operation in Ignite
Posted by dkarachentsev <dk...@gridgain.com>.
That happens because key and value fields mapped to the same DB columns. You
should use at least one unique column for value mapping.
Ignite throws away all fields from value that intersect with key fields.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696p9735.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Error while writethrough operation in Ignite
Posted by rishi007bansod <ri...@gmail.com>.
Following are my files
New_order_error.rar
<http://apache-ignite-users.70518.x6.nabble.com/file/n9729/New_order_error.rar>
I can read through from this new order database table but I am unable to
write to it
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696p9729.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Error while writethrough operation in Ignite
Posted by dkarachentsev <dk...@gridgain.com>.
Could you please share a simple reproducer?
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696p9716.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Error while writethrough operation in Ignite
Posted by rishi007bansod <ri...@gmail.com>.
Ignite version 1.7
I am using Ojdbc version 7.
Following is the cache config file I am using
CacheConfig.java
<http://apache-ignite-users.70518.x6.nabble.com/file/n9703/CacheConfig.java>
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696p9703.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Error while writethrough operation in Ignite
Posted by Alexey Kuznetsov <ak...@apache.org>.
Hi!
1) What version of Ignite are you using?
2) Oracle version? Oracle JDBC driver version?
3) It is possible to share with us Table create script?
We will try to reproduce. I see in logs: Caused by:
java.sql.SQLSyntaxErrorException:
ORA-00927: missing equal sign
May be there a bug in OracleDialect.
On Thu, Dec 22, 2016 at 7:22 PM, rishi007bansod <ri...@gmail.com>
wrote:
> But I have used CacheConfig file generated by schema import, what might be
> problem
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Error-while-writethrough-operation-
> in-Ignite-tp9696p9701.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
--
Alexey Kuznetsov
Re: Error while writethrough operation in Ignite
Posted by rishi007bansod <ri...@gmail.com>.
But I have used CacheConfig file generated by schema import, what might be
problem
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696p9701.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Error while writethrough operation in Ignite
Posted by dkarachentsev <dk...@gridgain.com>.
Looks like a bug in your CacheStore implementation - wrong SQL request is
built.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696p9700.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.