We were using Hibernate with DB2 on Linux. And things were fine. We switched the backend database to DB2 on Mainframe. And things started to break. For eg. we started getting this exceptions:
org.hibernate.util.JDBCExceptionReporter logExceptions SQL Error: -142, SQLState: 42612
org.hibernate.util.JDBCExceptionReporter logExceptions SQL Error: -516, SQLState: 2650
org.hibernate.util.JDBCExceptionReporter logExceptions SQL Error: -514, SQLState: 26501
This broke in a simple insert (below is Hibernate generated query).
insert into DB2TEST.ABC(KEY, USER_ID, USER_ID, DATE_ENTERED, DATE_UPDATED, SOME_KEY) values (?, ?, ?, ?, ?, default)
Copied the query in DB Visualizer (same JDBC drivers), and it runs fine. So what could be the problem?
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.2
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html