Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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

 
Greenhorn
Posts: 5
Android Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!