Internal Exception: java.sql.SQLException: Lock wait timeout exceeded; try

I’m getting this exception while adding an entity through Jpacontainer.addEntity() function. Note that I’m updating a column value of another entity by using Entitymanager.createQuery(“update sql goes here”).executeUpdate() just before adding the entity with pacontainer.addEntity() function.

Anyone there who got that exception for some reason or my above explanation have some reason???

Any help will be appreciated…