-
Notifications
You must be signed in to change notification settings - Fork 189
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
Error when using latest Oracle.EntityFrameworkCore 9 with CLOB column #432
Comments
@tegrit-joe-trupiano Can you turn on ODP.NET tracing and share the trace? We can then see the specific Oracle exception that occurs and the generated SQL. |
@alexkeh the query in question does not create a trace as it crashes in Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlConstantExpression. I moved the query that works and ran tracing for that and attached it. here is a picture of my test code trace.EXE_PID_11424_DATE_2025_01_03_TIME_16_23_57_482451.txt EDIT: SqlConstantExpression class changed a lot between .net8 and .net9 |
@tegrit-joe-trupiano I don't see any error or crash in the trace. We will need to increase the TraceLevel to capture more detailed diagnostics. Please use TraceLevel=7. It will capture private ODP.NET APIs, data, and network traffic. |
Trace level 7 for the code below included two files.
ARRIVOS3.PENSIONADMIN.EXE_PID_15664_DATE_2025_01_06_TIME_11_38_24_419224.txt |
@tegrit-joe-trupiano Something odd is going on with the generated traces. The two files appear to capture the traces back to back. The first trace file is generated at level 7. The second one is generated at trace level 1. At the end of the first trace file, I see:
Then, the second trace file at level 1 begins right after the first one ends. I'm guessing the crash occurs at the end of the second trace file, which doesn't have the detail that level 7 provides. Are you inadvertently setting the TraceLevel to 1 somewhere else in your code? |
@alexkeh Yes good catch, sorry about that here is the proper log all at level 7 |
@tegrit-joe-trupiano There's no ODP.NET error in the trace. The problem coud be something ODP.NET is passing back to EF Core or an issue with EF Core 9 itself. I have asked one of my ODP.NET dev team members to review the trace for more analysis. |
I've created bug 37459153 to track this issue. |
@alexkeh Let me know if you need anything else from me! |
"Content" property in image is a ColumnType of CLOB set in DBContext.
First line crashes in the image. Second line works. First line worked in .net8
Stack Trace
at Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlConstantExpression..ctor(Object value, RelationalTypeMapping typeMapping) at Microsoft.EntityFrameworkCore.Query.SqlExpressionFactory.Constant(Object value, RelationalTypeMapping typeMapping) at Oracle.EntityFrameworkCore.Query.Internal.OracleSqlTranslatingExpressionVisitor.VisitBinary(BinaryExpression binaryExpression) at Microsoft.EntityFrameworkCore.Query.RelationalSqlTranslatingExpressionVisitor.TranslateInternal(Expression expression, Boolean applyDefaultTypeMapping) at Microsoft.EntityFrameworkCore.Query.RelationalSqlTranslatingExpressionVisitor.Translate(Expression expression, Boolean applyDefaultTypeMapping) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.TranslateExpression(Expression expression, Boolean applyDefaultTypeMapping) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.TranslateLambdaExpression(ShapedQueryExpression shapedQueryExpression, LambdaExpression lambdaExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.TranslateWhere(ShapedQueryExpression source, LambdaExpression predicate) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.Translate(Expression expression) at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutorExpression[TResult](Expression query) at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query) at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass11_0
1.b__0()at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func
1 compiler) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteCore[TResult](Expression query, Boolean async, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable
1.GetEnumerator()at System.Collections.Generic.List
1..ctor(IEnumerable
1 collection)at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)
The text was updated successfully, but these errors were encountered: