6 Replies Latest reply on Jan 4, 2011 5:22 PM by derekw.dweston.abmigroup.com

    handling errors and exceptions in a CRUD app

    derekw.dweston.abmigroup.com

      Another newbie question here. (this for my seam project w/ generated entities)


      I've been receiving this error:
      --
      Caused by javax.servlet.ServletException with message: {paymenttrackerHome.persist}: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update


      (drill down more to cause)


      Caused by java.sql.BatchUpdateException with message: Batch entry 0 insert into public.paymenttracker (my query) was aborted. Call getNextException to see the cause.
      --
      The query works fine when I run it directly in the postgres DB -- query itself doesn't seem to be the problem then.


      I'd really like to call getNextException but I am not seeing where I might call this -- the layer of code interacting with the DB and actually sending the SQL is nowhere to be found. I'm sure I'm missing something here... exception handling can't be that difficult.