Exception on get method clusterj
Hi there,
I'm developing a java application using the clusterj api.
The code below sometimes throws the following exception
"com.mysql.clusterj.ClusterJDatastoreException: For field total column total valueDelegate object BigDecimal, error executing objectGetValue. Caused by java.lang.IllegalStateException:Current state = CODING_END, new state = FLUSHED"
The exception is thrown by the positionsInterface.getTotal() statement.
The code is running in multiple threads.
PositionsInterface positionsInterface = session.find(PositionsInterface.class, id);
if (positionsInterface == null) {
//Insert
positionsInterface = session.newInstance(PositionsInterface.class, id);
positionsInterface.setTotal(amount);
session.persist(positionsInterface);
}
else {
//Update
positionsInterface.setTotal(positionsInterface.getTotal().add(amount));
session.updatePersistent(positionsInterface);
}
Can anyone help me out with this ?
Subject
Views
Written By
Posted
Exception on get method clusterj
2503
April 09, 2015 09:16AM
1101
April 17, 2015 08:34AM
1308
April 17, 2015 11:40AM
1167
April 17, 2015 02:53PM
1015
April 17, 2015 03:35PM
1128
April 18, 2015 05:09PM
1609
April 20, 2015 01:46AM
1120
April 20, 2015 11:03AM
949
April 21, 2015 05:43AM
1243
May 18, 2015 08:25PM
1025
May 19, 2015 09:24AM
1033
May 19, 2015 11:57PM
1107
May 21, 2015 10:44AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.