I'm running Spring with Hibernate (3.2.5) and PostgreSQL (8.3).
And when I try to do session.update(myobject) I get the following error:
Code:
HTTP Status 500 -
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.Exception: Controller: UserController threw exception: Could not execute JDBC batch update
root cause
java.lang.Exception: Controller: UserController threw exception: Could not execute JDBC batch update
root cause
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
root cause
java.sql.BatchUpdateException: Batch entry 0 update public.portaluser set email=matjaz.muhic@tridens.si, name=changethis, surname=changethis, username=matjaz, password=123123123123, confirmid=confirmed, age=0, sex=changethis, country=changethis, city=changethis, photourl=changethis, phonetype=changethis, dateofbirth=NULL, blocked=no, lastlogin=NULL, phonenum=0 where portaluserid=13213216513535 was aborted. Call getNextException to see the cause.
note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server 9.1_02 logs.
Sun Java System Application Server 9.1_02
Then I thought it was problem cause dateobirth and lastlogin are NULL. But I tried executing query in pgAdmin (with and without those parameters being NULL) and I get the following error:
Code:
ERROR: missing FROM-clause entry for table "matjaz"
LINE 1: update public.portaluser set email=matjaz.muhic@tridens.si, ...
^
********** Error **********
ERROR: missing FROM-clause entry for table "matjaz"
SQL state: 42P01
Character: 36
Any suggestions? Or should I just forget it and write my own SQL update query?