Currently, I am using Spring 4.0.6 with Postgresql 9.5. I am calling one serviceClass1 to another serviceClass2 and getting an exception for a transaction as following:
serviceClass1.class
`@Transactional(readOnly = false, propagation = Propagation.REQUIRED,rollbackFor= { Throwable.class })
public Map<String, Object> storeUsersList(Map<String, Object> mapOfParams) throws Exception {
Map<String, Object> returnMap = new HashMap<String, Object>();
if (userListToStore != null && !userListToStore.isEmpty()) {
integrationService.manangePassCodes(org,userListToStore.size());
for (Users singleUser : userListToStore) {
try {
getEm().update(singleUser);`
serviceClass2.class
@Override
@Transactional(readOnly=false,propagation=Propagation.REQUIRED
,rollbackFor{Throwable.class})
public void manangePassCodes(Organizations org,int userToRegisterCount)throws Exception{
//some Logic
here I am getting Exception at this place -
getEm().update(singleUser);
Exception SQL state [25P02]; error code [0]; could not extract ResultSet
I have just read about this error about Postgres transaction but not able to get what should I use for Hibernate.