ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathew Samuel <grandarchvi...@yahoo.com>
Subject Row Access failure caused by cached column name ?
Date Thu, 17 Nov 2005 08:07:51 GMT

When column is added dynamically to an Oracle table
that is already defined and operated upon within an
sqlmap, (using select * from table), a general fetch
(results of a "select *" is mapped to a HashMap)
before and after the deletion of that column causes
iBATIS to reference the column name from its cache and
cause the following exception on the second fetch:

Caused by: 
java.sql.SQLException: Invalid column name
	at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
	at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
	at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
	at
oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:6218)
	at
oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1557)
	at
oracle.jdbc.driver.OracleResultSet.getObject(OracleResultSet.java:1531)
	at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at
com.ibatis.common.jdbc.logging.ResultSetLogProxy.invoke(ResultSetLogProxy.java:31)
	at $Proxy7.getObject(Unknown Source)
	at
com.ibatis.sqlmap.engine.type.ObjectTypeHandler.getResult(ObjectTypeHandler.java:19)
	at
com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getPrimitiveResultMappingValue(BasicResultMap.java:345)
	at
com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getResults(BasicResultMap.java:118)
	at
com.ibatis.sqlmap.engine.mapping.result.AutoResultMap.getResults(AutoResultMap.java:31)
	at
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:278)
	at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:127)
	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:174)
	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:142)
	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:99)
	at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:341)
	at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:326)
	at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:77)
	at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:54)
	at
com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForList(SqlMapDaoTemplate.java:192)


Any ideas on how to circumvent this ?

Thanks,
Mathew



		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

Mime
View raw message