jQuery in Action, 3rd edition
The moose likes Object Relational Mapping and the fly likes JPA problem! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JPA problem!" Watch "JPA problem!" New topic

JPA problem!

Zaeed McColin
Ranch Hand

Joined: Jan 13, 2009
Posts: 90
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

Open source
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

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

Joined: Jan 13, 2009
Posts: 90
sure, line 20
Zaeed McColin
Ranch Hand

Joined: Jan 13, 2009
Posts: 90
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
I agree. Here's the link: http://aspose.com/file-tools
subject: JPA problem!
It's not a secret anymore!