I am getting an Invalid Conversion error from DB2 - see stack trace below
2007-09-25 16.29.46 SQL Error: -99999, SQLState: 07006
2007-09-25 16.29.46 [IBM][CLI Driver] CLI0102E Invalid conversion. SQLSTATE=07006
2007-09-25 16.29.46 Error Processing Finished Product Declaration
org.hibernate.exception.SQLGrammarException: could not load an entity: [com.nppc.mes.domain.productdefinition.FinishedProduct#17800 46572]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:59)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1359)
I am using Hibernate 3.0.5, with C3P0 enabled. Tried with the lastest and greated C3P0 and the problem still exists. Only happens when I have maxStatements set to some value > 0. If PreparedStatement Caching in C3P0 is turned off, everything works great.
Have narrowed down to a test case, where I am making two different DAO calls, one uses native JDBC to call a stored procedure that has an OUT variable, and the other is a normal Hibernate HQL query. For some reason when the two are run, multiple times, either in the same Session each time, or separate sessions, eventually, <8 calls to the DB, I get the error. Error is always with the Hibernate HQL query.
Has anyone else come across an issue like this before with Prepared Statement Caching in C3P0? Does this look like an issue with the DB2 Drivers (7.2) or with caching of prepared statements in C3P0?
|