No EntityManager with actual transaction available for current thread - cannot reliably process '

Posted pzw23

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了No EntityManager with actual transaction available for current thread - cannot reliably process '相关的知识,希望对你有一定的参考价值。

No EntityManager with actual transaction available for current thread - cannot reliably process ‘remove‘ call

  遇到这种问题,应该是你的controller层直接调用了Repository的删除方法,类似的可能是controller层直接调用了Repository的增加或修改方法。如果项目封装了controller不能直接调用Repository的删除、增加和修改方法,那么在controller直接调用Repository的删除、增加和修改方法就会报标题的那个错误,这时Repository的删除、增加和修改方法需要用service封装。

以上是关于No EntityManager with actual transaction available for current thread - cannot reliably process '的主要内容,如果未能解决你的问题,请参考以下文章

我找不到解决 PersistenceException: No Persistence provider for EntityManager

报错javax.persistence.PersistenceException: No Persistence provider for EntityManager named itcast

Act with Prudence读后感

bug使用spring+struts2注解开发,提示” There is no Action mapped for namespace [/] and action name [xxxxx.act

With Cars, No license plates

LeetCode 1042. Flower Planting With No Adjacent