This discussion is archived
1 Reply Latest reply: Dec 5, 2012 6:59 AM by DNETFX RSS

XCOPY deploy + error 2019: Mapping between Boolean and number(1,0)

DNETFX Newbie
Currently Being Moderated
Why I try and run an application on a VM with an XCOPY deployment of ODP.NET + Instant Client I receive errors of the sort:

MyEdmxName.msl(127,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.Boolean[Nullable=False,DefaultValue=]' of member 'MyPropertyName' in type 'MyClassName' is not compatible with 'OracleEFProvider.number[Nullable=False,DefaultValue=,Precision=1,Scale=0]' of member 'MY_COLUMN_NAME' in type 'MY_TABLE_NAME'.

at System.Data.Mapping.StorageMappingItemCollection.Init(EdmItemCollection edmCollection, StoreItemCollection storeCollection, IEnumerable`1 xmlReaders, List`1 filePaths, Boolean throwOnError)
at System.Data.Metadata.Edm.MetadataCache.StoreMetadataEntry.LoadStoreCollection(EdmItemCollection edmItemCollection, MetadataArtifactLoader loader)
at System.Data.Metadata.Edm.MetadataCache.LoadItemCollection[T](IItemCollectionLoader`1 itemCollectionLoader, T entry)
at System.Data.Metadata.Edm.MetadataCache.GetOrCreateStoreAndMappingItemCollections(String cacheKey, MetadataArtifactLoader loader, EdmItemCollection edmItemCollection, Object& entryToken)
at System.Data.EntityClient.EntityConnection.LoadStoreItemCollections(MetadataWorkspace workspace, DbConnection storeConnection, DbProviderFactory factory, DbConnectionOptions connectionOptions, EdmItemCollection edmItemCollection, MetadataArtifactLoader artifactLoader)
at System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections)
at System.Data.EntityClient.EntityConnection.InitializeMetadata(DbConnection newConnection, DbConnection originalConnection, Boolean closeOriginalConnectionOnFailure)
at System.Data.EntityClient.EntityConnection.Open()
at System.Data.Objects.ObjectContext.EnsureConnection()
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

For each boolean member (both nullable and non-nullable).

This is dispite having the following sections in my app.config:

<configSections>
<section name="oracle.dataaccess.client"
type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>

<system.data>
<DbProviderFactories>
<!-- Remove in case this is already defined in machine.config -->
<remove invariant="Oracle.DataAccess.Client" />
<add name="Oracle Data Provider for .NET"
invariant="Oracle.DataAccess.Client"
description="Oracle Data Provider for .NET"
type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
</DbProviderFactories>
</system.data>

<oracle.dataaccess.client>
<settings>
<add name="bool" value="edmmapping number(1,0)" />
<add name="byte" value="edmmapping number(3,0)" />
<add name="int16" value="edmmapping number(5,0)" />
<add name="int32" value="edmmapping number(10,0)" />
<add name="int64" value="edmmapping number(19,0)" />
<add name="int16" value="edmmapping number(38,0)" />
<add name="int32" value="edmmapping number(38,0)" />
<add name="int64" value="edmmapping number(38,0)" />
</settings>
</oracle.dataaccess.client>

This problem does not occur on machines with the full version of the client installed.

The XCOPY installation step I performed are copying files from ODAC112030Xcopy_x64.zip directories:

instantclient_11_2\
odp.net4\bin\
odp.net4\odp.net\bin\
odp.net4\odp.net\PublisherPolicy\4

Into the app's setup directory.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points