reset password
Author Message
vishalkukkar
Posts: 11
Posted 14:04 Feb 04, 2016 |

when i add user by entityManager.merge(user); 

I am getting following error.I have added a screenshot.


javax.persistence.TransactionRequiredException: No EntityManager with actual transaction available for current thread - cannot reliably process 'merge' call

 

 

Attachments:
cysun
Posts: 2935
Posted 14:09 Feb 04, 2016 |

Add a @Transactional annotation to the dao method. See UserDao.saveUser() in CSNS2.

vishalkukkar
Posts: 11
Posted 14:20 Feb 04, 2016 |

I am using same method and also using @Transactional. still getting same error.

cysun
Posts: 2935
Posted 14:22 Feb 04, 2016 |

Move your models & daos out of the web package.

vishalkukkar
Posts: 11
Posted 14:45 Feb 04, 2016 |

Moved them out of web package.still getting same error

Attachments: