When I call:
entityManager.flush()
I get the exception mentioned in the title.
I am using Hibernate JPA.
I had the same problem... spent some hours until I found the reason finally. It was just one line of code that caused the exception in my case...
In my mvc-core-config.xml the following line was the reason:
After I changed it as follows, everything worked again:
So I guess the scanning of all my application packages instead of just my @Controller classes lead to the problem like @harshal-waghmare mentioned in his post to another answer.