Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA problem!

 
Zaeed McColin
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi folks,
I try to add do a transaction with JPA by a Servlet
but system doesn't throw any exception, also I don't have any changes in the database
please help
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you step through the code with the debugger? Does any line of code cause an exit?

Perhaps you need to save each author first, and then the book. Can you save the book without specifying an author? I know it doesn't make sense, but just from a testing perspective, maybe you can see if that works. Can you just save an author alone?

Nothing in the log files? Have you been able to persist anything to this table? So, do you have a simple example where you can go to this database and save just one, simple record? Is it working in other instances, but just not this one?

Just digging for ideas...

-Cameron Mckenzie
 
Zaeed McColin
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sure, line 20
 
Zaeed McColin
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wow, i solved it,
I just change my provider "OpenJPA" and use

instead of

and it works Okay
@Mr. McKenzie: yes I did all of them, test without setAuthors(), check the logs, it was amazing, without any exception, error, update or something like that
thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic