Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODP.Net error when querying a materialized view using dapper fails with NRE #426

Open
marcwittke opened this issue Dec 12, 2024 · 1 comment

Comments

@marcwittke
Copy link

Error is:

System.Data.DataException: Error parsing column 5 (OFFER_LEAD_TIME_RAW_VALUE=1 - Int64)

System.Data.DataException
Error parsing column 5 (OFFER_LEAD_TIME_RAW_VALUE=1 - Int64)
   at Dapper.SqlMapper.ThrowDataException(Exception ex, Int32 index, IDataReader reader, Object value) in /_/Dapper/SqlMapper.cs:line 3928
   at Deserialize63551f68-2134-4050-b46a-718890025aec(DbDataReader)
   at Dapper.SqlMapper.QueryAsync[T](IDbConnection cnn, Type effectiveType, CommandDefinition command)
   at Wombat.Adapters.Oracle.Shared.Offers.OfferRepository.SearchOffersByProductIdAsync(SearchConsumablesByProductIdParams searchParams, LoadOptions loadOptions, CancellationToken cancellationToken)
   at Wombat.Adapters.Oracle.Tests.Search.Consumables.TheConsumablesSearchView.<CanSearchProductsUsingSearchString>b__21_1(SearchProduct p)
   at Wombat.Adapters.Oracle.Tests.Search.Consumables.TheConsumablesSearchView.CanSearchProductsUsingSearchString()
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass47_0.<<InvokeTestMethodAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction)
   at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code)

System.NullReferenceException
Object reference not set to an instance of an object.
   at OracleInternal.ServiceObjects.OracleFailoverMgrImpl.OnError(OracleConnection connection, CallHistoryRecord chr, Object mi, Exception ex, Boolean bTopLevelCall, Boolean& bCanRecordNewCall)
   at Oracle.ManagedDataAccess.Client.OracleDataReader.GetValue(Int32 i)
   at Deserialize63551f68-2134-4050-b46a-718890025aec(DbDataReader)

Oracle database 19.3 EE, containerized.

It is noteworthy that the column causing the error varies on each test run.

can be traced back to Oracle.ManagedDataAccess.Core version 23.6.0. Going back to 23.5.1 makes the error disappear.

@alexkeh
Copy link
Member

alexkeh commented Dec 12, 2024

Can you turn on ODP.NET tracing (Trace Level 7) for runs with ODP.NET Core 23.6 and 23.5.1 and share those traces? That will tell us where in ODP.NET the object reference error is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants