File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Trying to fix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Trying to fix "Write operations are not allowed in read-only mode (FlushMode.MANUAL)" error" Watch "Trying to fix "Write operations are not allowed in read-only mode (FlushMode.MANUAL)" error" New topic
Author

Trying to fix "Write operations are not allowed in read-only mode (FlushMode.MANUAL)" error

Gabriela Radu
Greenhorn

Joined: Jan 26, 2012
Posts: 5

Hello,

I am having fun with Spring Rest and Hibernate on the server side and Android on the client side.
If I am calling methods that use the request method GET, i do get information from server, else if I try to call POST methods, to add an entity in a database, i only get this error:


It drives me a bit crazy because i can't figure out what i am doing wrong here. I've done this before and it worked just fine. Please if you have the time take a look, i need a fresh pair of eyes to look at the code.
This is my controller method:


In persistence.xml i specify:


Why do i keep getting this error if i already specify the flush mode? I have no annotation for transactions) on my service implementation class, or anywhere else regarding my controller.

Any help would be great, thank you.
 
jQuery in Action, 2nd edition
 
subject: Trying to fix "Write operations are not allowed in read-only mode (FlushMode.MANUAL)" error
 
Similar Threads
Exception on Save operation with Spring annotation
Keeping current logged user.
ContentNegotiatingViewResolver
String-Hibernate read-only mode (FlushMode.NEVER)
Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL)