ODP.Net and blob field compatibility using NHibernate #444
-
Hello, is there any compatibility issue between ODP.Net and blob field? I am using blob fields with .Net 4.8 on an "Oracle Database 10g Release 10.2.0.5.0 - 64bit Production" with NHibernate 5.5 (.hbm.xml type = "BinaryBlob") and when I test my code with .Net 9 on the same database using Oracle.ManagedDataAccess.Core 23.7.0 I get this error when loading a picture as a blob field: TTC Error: could not load an entity: NHibernate.Exceptions.GenericADOException This exception was originally thrown at this call stack: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
ODP.NET clients have not supported Oracle DB 10g (10.2) since version 12.2. The first production ODP.NET Core version is 18c. That said, I suspect the problem source is between Oracle 11g and 12c. Oracle then started supporting a new LOB protocol. All DB versions after 11g only used the new protocol. New Oracle Clients supported the new and old protocols. Oracle client 23ai was the first to stop supporting 11g DBs, which meant no more old LOB protocol support. I've seen a similar LOB issue when using ODP.NET 23 with DB 11g or earlier in non-NHibernate apps. If you downgrade to the ODP.NET Core 21c or 19c version, the LOB protocol will be backwards-compatible with DB 11.2. 11.2 used the same LOB protocol as 10.2. Remember, those ODP.NET versions haven't been certified with .NET 9. You can try running older ODP.NET Core versions with .NET 9. In Oracle's testing, we're not seeing too many issues when using new .NET versions with older ODP.NET Core versions, at least not since .NET Core 3. That's about the time MS stopped making breaking changes in the ADO.NET part of the runtime. While you won't technically have a supported stack, this is the most likely way to get LOBs to work without upgrading your DB. It's very kludgy though, which is why my top recommendation is to upgrade your DB to a supported version, 19c or higher. |
Beta Was this translation helpful? Give feedback.
ODP.NET clients have not supported Oracle DB 10g (10.2) since version 12.2. The first production ODP.NET Core version is 18c.
That said, I suspect the problem source is between Oracle 11g and 12c. Oracle then started supporting a new LOB protocol. All DB versions after 11g only used the new protocol. New Oracle Clients supported the new and old protocols. Oracle client 23ai was the first to stop supporting 11g DBs, which meant no more old LOB protocol support. I've seen a similar LOB issue when using ODP.NET 23 with DB 11g or earlier in non-NHibernate apps.
If you downgrade to the ODP.NET Core 21c or 19c version, the LOB protocol will be backwards-compatible with DB 11.2. 11.2 used the sa…