Page 1 of 1

Admin Rest API : Product update fails

Posted: Thu Mar 06, 2014 5:03 pm
by rameshv1210
Hi,
I have created an Admin Rest API, in the similar format of Site Rest API.

It works fine for read operations, but when i try to update product details from rest end point, it ends up silent without any errors, but with no changes to the database.

So, I tried adding @Transactional("blTransactionManager") to my own service method, then it fails with Transaction Rollback Exception.

I tried different ways by removing spring security, spring filters, etc.... but of no use. I am trying this for past 2 days, any suggestions are much appreciated.

Thanks,
Ramesh.V

Re: Admin Rest API : Product update fails

Posted: Sun Mar 23, 2014 7:29 pm
by phillipuniverse
What is the transaction rollback exception? Usually silently failing when updating the database is a victim of not having a transaction. Now it looks like you have a transaction but it is throwing an exception somewhere.

If it's something about a session you might make sure that the OpenEntityManagerInView filter is executing which will ensure that you have an active database connection for every request. This is usually set up in applicationContext-filter.xml.