Transaction is required to perform this operation (either use a transaction or extended persistence context)

后端 未结 6 1811
迷失自我
迷失自我 2020-12-20 14:27

I\'m using Wildfly 10.0.0 Final, Java EE7, Maven and JPA 2.1. When I am querying my database for records it works fine and lists out the employees, but when I am trying to p

6条回答
  •  独厮守ぢ
    2020-12-20 14:45

    I had the same problem, the solution was

    @Transactional(rollbackOn = Exception.class)
    

    add to method called by Bean

提交回复
热议问题