- 3,715,999 Users
- 2,242,927 Discussions
- 7,845,731 Comments
Forum Stats
Discussions
Categories
- 17 Data
- 362.2K Big Data Appliance
- 7 Data Science
- 1.6K Databases
- 476 General Database Discussions
- 3.7K Java and JavaScript in the Database
- 22 Multilingual Engine
- 487 MySQL Community Space
- 5 NoSQL Database
- 7.6K Oracle Database Express Edition (XE)
- 2.8K ORDS, SODA & JSON in the Database
- 417 SQLcl
- 42 SQL Developer Data Modeler
- 184.9K SQL & PL/SQL
- 21K SQL Developer
- 1.9K Development
- 3 Developer Projects
- 32 Programming Languages
- 135.1K Development Tools
- 9 DevOps
- 3K QA/Testing
- 256 Java
- 6 Java Learning Subscription
- 10 Database Connectivity
- 67 Java Community Process
- 1 Java 25
- 9 Java APIs
- 141.1K Java Development Tools
- 6 Java EE (Java Enterprise Edition)
- 153K Java Essentials
- 135 Java 8 Questions
- 86.2K Java Programming
- 270 Java Lambda MOOC
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 10 Java SE
- 13.8K Java Security
- 3 Java User Groups
- 22 JavaScript - Nashorn
- 18 Programs
- 125 LiveLabs
- 30 Workshops
- 9 Software
- 3 Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 3 Deutsche Oracle Community
- 11 Español
- 1.9K Japanese
- 2 Portuguese
Table with XMLTYPE column causes: Unsupported column datatype
Environment:
C# project with Visual Studio 2015
Reference to: Oracle.ManagedDataAccess 12.1.2400
Oracle.ManagedDataAccess.dll: 4.121.2.0
ORM: NHibernate 4.0.3.4000
I frequently get the following errors and I have reason to believe they all have the same root cause:
Message: Unsupported column datatype
Error Code: -1450
Source: Oracle Data Provider for .NET, Managed Driver
Message: Value cannot be null.Parameter name: value
Error code: -2146232832
Source: NHibernate
Message: could not execute query
HResult=0x80131600
NHibernate.Exceptions.GenericADOException occurred
I could not find a fix or even a workaround. Some posts seem to point to nullability of columns so I made everything nullable but that made no difference.
Something else I found is this section in the Oracle driver readme:
Unsupported Parameter Types with OLE DB .NET Data Provider
* The Provider does not support LongVarChar, LongVarWChar, LongVarBinary, and
BSTR IN/OUT and OUT parameter types with OLE DB .NET Data Provider because
of a Microsoft's OLE DB .NET Data Provider known limitation.
Unsupported Datatypes
* The Trusted Oracle datatype MLSLABEL is not supported by the OraOLEDB driver.
* The provider does not currently support Object datatypes.
Does anybody have any idea what this might be due to?
Thank you,
Simon
Best Answer
-
Then it's very likely you have an earlier ODP.NET 12.1 version on your machine that was GACed. GACed assemblies override using NuGet installed assemblies.
You can either unGAC or uninstall the earlier ODP.NET version to prevent the override from occurring. Make sure to unGAC from the correct GAC since there's one for 32-bit and one for 64-bit, as well as one for .NET 2 and one for .NET 4.
Answers
-
Upgrade your managed ODP.NET version. XmlType was not supported until the managed ODP.NET version that was part of ODAC 12c Release 3. At this point, you may as well upgrade to the latest ODAC 12.2 version.
-
Thank you for your response.
But the only dependency that the C# solution uses it's whatever NuGet downloads in the packages folder, and that is: Oracle.ManagedDataAccess.12.1.2400
Which works for everybody else on the team.
In fact nobody has any ODP.NET installed as far as I can tell.
What else could it be?
-
Then it's very likely you have an earlier ODP.NET 12.1 version on your machine that was GACed. GACed assemblies override using NuGet installed assemblies.
You can either unGAC or uninstall the earlier ODP.NET version to prevent the override from occurring. Make sure to unGAC from the correct GAC since there's one for 32-bit and one for 64-bit, as well as one for .NET 2 and one for .NET 4.
-
Alex,
Sorry for not replying right away but removing the DLL from the GAC was far from straightforward as I came across a number of issues. But long story short after doing that, the problem is indeed gone!
It had been going on for months and I can't thank you enough for your help!
Best,
Simon