Mapping Mode "File" don't work
Posted: Wed 30 Jun 2021 08:59
Hello,
if i use the mapping mode "File" there will be thrown an exception at runtime:
System.TypeInitializationException: "The type initializer for 'DefaultXmlMappingProvider' threw an exception."
Inner Exception: ArgumentException: Requested value 'Out' was not found.
Stacktrace:
at System.Enum.TryParseByName(RuntimeType enumType, String originalValueString, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, UInt64& result)
at System.Enum.TryParseInt32Enum(RuntimeType enumType, String originalValueString, ReadOnlySpan`1 value, Int32 minInclusive, Int32 maxInclusive, Boolean ignoreCase, Boolean throwOnFailure, TypeCode type, Int32& result)
at System.Enum.TryParse(Type enumType, String value, Boolean ignoreCase, Boolean throwOnFailure, Object& result)
at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
at [1].(String [1])
at .(XmlReader [1])
at .(XmlReader [1])
at .[1](XmlReader [1])
at Devart.Data.Linq.Mapping.XmlMappingSource.FromReader(XmlReader reader)
at Devart.Data.Linq.Mapping.XmlMappingSource.FromStream(Stream stream)
at Devart.Data.Linq.Mapping.XmlMappingSource.[1](String [1], Assembly)
at Devart.Data.Linq.Mapping.XmlMappingSource.FromResource(String resName)
After spending some hours i figured out the error is caused by "direction" attribute at parameter element.
Example:
<Function Name="ZWT_WS.PKG_PROGRAMMDATEN.PRC_SET_PROGRAMMDATEN" Method="PRCSETPROGRAMMDATEN">
<Parameter Name="P_PROG_ID" Parameter="P_PROG_ID" DbType="NUMBER(12)" />
<Parameter Name="P_FACHL_ID" Parameter="P_FACHL_ID" DbType="VARCHAR2(48 CHAR)" />
<Parameter Name="P_ERGEBNIS" Parameter="P_ERGEBNIS" DbType="VARCHAR2(12 CHAR)" Direction="Out" />
<Parameter Name="P_ERR_TEXT" Parameter="P_ERR_TEXT" DbType="VARCHAR2(2000 CHAR)" Direction="Out" />
</Function>
As soon as a "direction" is given, the error occurs, no matter if direction="In" ... "Out" or "InOut".
Additional Infos:
Provider: Devart dotConnect for Oracle 9.14.1273.0
Devart Entity Developer 6.11.1258
Target Framework: .net5
Can someone please help me?
best regards
Webscotty
if i use the mapping mode "File" there will be thrown an exception at runtime:
System.TypeInitializationException: "The type initializer for 'DefaultXmlMappingProvider' threw an exception."
Inner Exception: ArgumentException: Requested value 'Out' was not found.
Stacktrace:
at System.Enum.TryParseByName(RuntimeType enumType, String originalValueString, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, UInt64& result)
at System.Enum.TryParseInt32Enum(RuntimeType enumType, String originalValueString, ReadOnlySpan`1 value, Int32 minInclusive, Int32 maxInclusive, Boolean ignoreCase, Boolean throwOnFailure, TypeCode type, Int32& result)
at System.Enum.TryParse(Type enumType, String value, Boolean ignoreCase, Boolean throwOnFailure, Object& result)
at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
at [1].(String [1])
at .(XmlReader [1])
at .(XmlReader [1])
at .[1](XmlReader [1])
at Devart.Data.Linq.Mapping.XmlMappingSource.FromReader(XmlReader reader)
at Devart.Data.Linq.Mapping.XmlMappingSource.FromStream(Stream stream)
at Devart.Data.Linq.Mapping.XmlMappingSource.[1](String [1], Assembly)
at Devart.Data.Linq.Mapping.XmlMappingSource.FromResource(String resName)
After spending some hours i figured out the error is caused by "direction" attribute at parameter element.
Example:
<Function Name="ZWT_WS.PKG_PROGRAMMDATEN.PRC_SET_PROGRAMMDATEN" Method="PRCSETPROGRAMMDATEN">
<Parameter Name="P_PROG_ID" Parameter="P_PROG_ID" DbType="NUMBER(12)" />
<Parameter Name="P_FACHL_ID" Parameter="P_FACHL_ID" DbType="VARCHAR2(48 CHAR)" />
<Parameter Name="P_ERGEBNIS" Parameter="P_ERGEBNIS" DbType="VARCHAR2(12 CHAR)" Direction="Out" />
<Parameter Name="P_ERR_TEXT" Parameter="P_ERR_TEXT" DbType="VARCHAR2(2000 CHAR)" Direction="Out" />
</Function>
As soon as a "direction" is given, the error occurs, no matter if direction="In" ... "Out" or "InOut".
Additional Infos:
Provider: Devart dotConnect for Oracle 9.14.1273.0
Devart Entity Developer 6.11.1258
Target Framework: .net5
Can someone please help me?
best regards
Webscotty