[ http://issues.apache.org/jira/browse/IBATISNET-55?page=all ]
Gilles Bayon reassigned IBATISNET-55:
-------------------------------------
Assign To: Roberto Rabe (was: Gilles Bayon)
> ODP.NET 10g (10.1) resultClass InvalidCastExceptions for byte, double, and
> float
> --------------------------------------------------------------------------------
>
> Key: IBATISNET-55
> URL: http://issues.apache.org/jira/browse/IBATISNET-55
> Project: iBatis for .NET
> Type: Task
> Versions: DataMapper 1.1
> Environment: Oracle 9i with ODP.NET 10g (10.1)
> Reporter: Roberto Rabe
> Assignee: Roberto Rabe
> Priority: Minor
>
> System.InvalidCastException is thrown when attempting the following (see
> Oracle ODP NUnit ResultClass.xml for test result comments):
> <!--
> Using ODP.NET 10.1
> Throws System.InvalidCastException
> at Oracle.DataAccess.Client.OracleDataReader.GetByte(Int32 i)
> at
> IBatisNet.DataMapper.TypesHandler.ByteTypeHandler.GetValueByIndex(ResultProperty
> mapping, IDataReader dataReader) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\TypesHandler\ByteTypeHandler.cs:line
> 69
> at
> IBatisNet.DataMapper.TypesHandler.BaseTypeHandler.GetDataBaseValue(ResultProperty
> mapping, IDataReader dataReader) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\TypesHandler\BaseTypeHandler.cs:line
> 58
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.SetObjectProperty(RequestScope
> request, ResultMap resultMap, ResultProperty mapping, Object& target,
> IDataReader reader) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 1059
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.ApplyResultMap(RequestScope
> request, IDataReader reader, Object resultObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 403
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForObject(RequestScope
> request, IDalSession session, Object parameterObject, Object resultObject)
> in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 562
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject(IDalSession
> session, Object parameterObject, Object resultObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 505
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject(IDalSession
> session, Object parameterObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 486
> at IBatisNet.DataMapper.SqlMapper.QueryForObject(String
> statementName, Object parameterObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\SqlMapper.cs:line
> 489
> at
> IBatisNet.DataMapper.Test.NUnit.SqlMapTests.ResultClassTest.TestByte() in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper.Test\NUnit\SqlMapTests\ResultClassTest.cs:line
> 55
> -->
> <statement id="GetByte"
> parameterClass="Int"
> resultClass="byte" >
> select 155 from dual where 1 = #value#
> </statement>
> <!--
> Using ODP.NET 10.1
> Throws System.InvalidCastException
> at Oracle.DataAccess.Client.OracleDataReader.GetDouble(Int32 i)
> at
> IBatisNet.DataMapper.TypesHandler.DoubleTypeHandler.GetValueByIndex(ResultProperty
> mapping, IDataReader dataReader) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\TypesHandler\DoubleTypeHandler.cs:line
> 69
> at
> IBatisNet.DataMapper.TypesHandler.BaseTypeHandler.GetDataBaseValue(ResultProperty
> mapping, IDataReader dataReader) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\TypesHandler\BaseTypeHandler.cs:line
> 58
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.SetObjectProperty(RequestScope
> request, ResultMap resultMap, ResultProperty mapping, Object& target,
> IDataReader reader) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 1059
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.ApplyResultMap(RequestScope
> request, IDataReader reader, Object resultObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 403
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForObject(RequestScope
> request, IDalSession session, Object parameterObject, Object resultObject)
> in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 562
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject(IDalSession
> session, Object parameterObject, Object resultObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 505
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject(IDalSession
> session, Object parameterObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 486
> at IBatisNet.DataMapper.SqlMapper.QueryForObject(String
> statementName, Object parameterObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\SqlMapper.cs:line
> 489
> at
> IBatisNet.DataMapper.Test.NUnit.SqlMapTests.ResultClassTest.TestDouble() in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper.Test\NUnit\SqlMapTests\ResultClassTest.cs:line
> 103
> -->
> <statement id="GetDouble"
> parameterClass="Int"
> resultClass="double" >
> select 99.5 from dual where 1 = #value#
> </statement>
> <!--
> Using ODP.NET 10.1
> Throws System.InvalidCastException
> at Oracle.DataAccess.Client.OracleDataReader.GetFloat(Int32 i)
> at
> IBatisNet.DataMapper.TypesHandler.SingleTypeHandler.GetValueByIndex(ResultProperty
> mapping, IDataReader dataReader) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\TypesHandler\SingleTypeHandler.cs:line
> 75
> at
> IBatisNet.DataMapper.TypesHandler.BaseTypeHandler.GetDataBaseValue(ResultProperty
> mapping, IDataReader dataReader) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\TypesHandler\BaseTypeHandler.cs:line
> 58
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.SetObjectProperty(RequestScope
> request, ResultMap resultMap, ResultProperty mapping, Object& target,
> IDataReader reader) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 1059
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.ApplyResultMap(RequestScope
> request, IDataReader reader, Object resultObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 403
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForObject(RequestScope
> request, IDalSession session, Object parameterObject, Object resultObject)
> in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 562
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject(IDalSession
> session, Object parameterObject, Object resultObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 505
> at
> IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject(IDalSession
> session, Object parameterObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line
> 486
> at IBatisNet.DataMapper.SqlMapper.QueryForObject(String
> statementName, Object parameterObject) in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper\SqlMapper.cs:line
> 489
> at
> IBatisNet.DataMapper.Test.NUnit.SqlMapTests.ResultClassTest.TestSingle() in
> C:\projects\ibatis\asf\trunk\cs\mapper\IBatisNet.DataMapper.Test\NUnit\SqlMapTests\ResultClassTest.cs:line
> 161
> -->
> <statement id="GetSingle"
> parameterClass="Int"
> resultClass="float" >
> select 92233.5 from dual where 1 = #value#
> </statement>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira