Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.1.2
We have a UserType that executes a
session.get to replace the value of a property at load time. This seems to be causing problems with Hibernate. The following exception is thrown during a list() operation on an object containing this custom type,
but we only see this exception when the UserType is doing session.get within nullSafeGet:
Code:
Caused by: java.sql.SQLException: Exhausted Resultset
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:382)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1515)
at com.mchange.v2.c3p0.impl.NewProxyResultSet.getString(NewProxyResultSet.java:3472)
at org.hibernate.type.StringType.get(StringType.java:18)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
at xxx.yyy.usertype.DisplaySetValueType.nullSafeGet(DisplaySetValueType.java:91)
I can't find anywhere in the documentation where it says that you cannot access the Session from within a UserType's nullSafeGet methods (although this makes some degree of sense to avoid). Can someone please confirm that accessing a Session from within a UserType is not allowed? TIA ~