ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <ni...@wis.nl>
Subject Calling DAO within TypeHandlerCallback
Date Tue, 31 May 2005 13:50:57 GMT
Hi, me again :)

When using a TypeHandlerCallback-implementation that calls the DAO, any
subsequent property that iBATIS tries to fetch results in the following
error (this dump occurred with a Date-property):

java.sql.SQLException: Invalid state, the ResultSet object is closed.
	at
net.sourceforge.jtds.jdbc.JtdsResultSet.checkOpen(JtdsResultSet.java:284
)
	at
net.sourceforge.jtds.jdbc.JtdsResultSet.findColumn(JtdsResultSet.java:86
4)
	at
net.sourceforge.jtds.jdbc.JtdsResultSet.getTimestamp(JtdsResultSet.java:
1225)
	at
org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResul
tSet.java:261)
	at
com.ibatis.sqlmap.engine.type.DateTypeHandler.getResult(DateTypeHandler.
java:44)
	at
com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getPrimitiveResul
tMappingValue(BasicResultMap.java:544)
	at
com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getResults(BasicR
esultMap.java:303)
	at
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor
.java:363)
	at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.
java:184)
	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQu
ery(GeneralStatement.java:205)
	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery
WithCallback(GeneralStatement.java:173)
	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery
ForObject(GeneralStatement.java:104)
	at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlM
apExecutorDelegate.java:561)
	at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlM
apExecutorDelegate.java:536)
	at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSes
sionImpl.java:97)
	at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClie
ntImpl.java:70)
	at
com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForObject(SqlMapDa
oTemplate.java:162)
	at
nl.wis.services.dao.impl.sqlmap.SqlMapBaseDaoTemplate.queryForObject(Sql
MapBaseDaoTemplate.java:120)
	at <snip>

When just constructing objects within the handler (as stated in FAQ),
all goes well. I tried to do some debugging and it seems that the inner
DAO-call disposes the resultset, which would obviously result in the
stated error, but I'm not sure this is the case.

I really like the typehandlers, so hopefully this can be resolved...

Thanks again,

Niels

Mime
View raw message