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

Abhishek Chaturvedi commented on IGNITE-9153:
---------------------------------------------

Hi, I checked, it is not working and still throws: class 
org.apache.ignite.IgniteException: Cannot start/stop cache within lock or 
transaction [cacheNames=DEMO_CACHE, operation=dynamicStartCache]\

IgniteCache<Object, Object> igniteCache = ignite.getOrCreateCache("DEMO_CACHE");
FieldsQueryCursor<List<?>> returnedList = null;
IgniteTransactions transactions = null;
Transaction tx = null;
try {
 transactions = ignite.transactions();
 tx = transactions.txStart();
 log.info("tx ::"+tx);
 returnedList = igniteCache.withKeepBinary().query(new 
SqlFieldsQuery(query).setArgs(parameters));
 tx.commit();
} catch (RuntimeException ex) {
 log.error(ex);
 tx.rollback();
} finally {
 if (tx != null) {
 tx.close();
 }
}

> Accessing cache from transaction on client node, where it was not accessed 
> yet throws an exception
> --------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-9153
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9153
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.6
>            Reporter: Evgenii Zhuravlev
>            Priority: Major
>              Labels: newbie
>         Attachments: ClientCacheTransactionsTest.java
>
>
> Exception message: Cannot start/stop cache within lock or transaction. 
> Reproducer is attached: ClientCacheTransactionsTest.java



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to