Not allowed to create transaction on shared EntityManager – use Spring transactions or EJB CMT

I guess the problem here is that although you have defined the bean for the transaction manager, you haven’t annotated the create() method with @Transactional which enables spring transactions.

Also remove the entityManager.getTransaction().commit(); statement as now all the transaction management will be handled by spring, if you leave the statement as it is then you will get the same error again.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)