Page 1 of 1

Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Wed 17 Oct 2018 22:26
by hyiothesia
We recently upgraded from 8.5.497 to 9.4.348 and now we are getting Schema specified is not valid errors like the one below. Did something change in how the metadata is embedded in the assembly? We are using EF4 and believe we have updated all references correctly, but clearly something is not quite right.

Desc: System.Data.MetadataException: Schema specified is not valid. Errors:
Afm.ssdl(782,6) : error 0040: The Type VARCHAR2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
Afm.ssdl(783,6) : error 0040: The Type VARCHAR2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
Afm.ssdl(794,6) : error 0040: The Type VARCHAR2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
Afm.ssdl(795,6) : error 0040: The Type VARCHAR2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
Afm.ssdl(796,6) : error 0040: The Type VARCHAR2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
Afm.ssdl(797,6) : error 0040: The Type DATE is not qualified with a namespace or alias. Only primitive types can be used without qualification.
Afm.ssdl(798,6) : error 0040: The Type VARCHAR2
.
.
.
Afm.ssdl(12923,6) : error 0040: The Type VARCHAR2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
at System.Data.Metadata.Edm.StoreItemCollection.Loader.ThrowOnNonWarningErrors()
at System.Data.Metadata.Edm.StoreItemCollection.Loader.LoadItems(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths)
at System.Data.Metadata.Edm.StoreItemCollection.Init(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths, Boolean throwOnError, DbProviderManifest& providerManifest, DbProviderFactory& providerFactory, String& providerManifestToken, Memoizer`2& cachedCTypeFunction)
at System.Data.Metadata.Edm.StoreItemCollection..ctor(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths)
at System.Data.Metadata.Edm.MetadataCache.StoreMetadataEntry.LoadStoreCollection(EdmItemCollection edmItemCollection, MetadataArtifactLoader loader)
at System.Data.Metadata.Edm.MetadataCache.StoreItemCollectionLoader.LoadItemCollection(StoreMetadataEntry entry)
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.Data.Entity.Internal.Linq.InternalQuery`1.GetEnumerator()
at System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Avista.Afm.Data.CiPremDataService.GetAddressUnitTypes() in c:\Dev\AFM\DevartAndOffice\AFM\Data\Core\CiPremDataService.cs:line 681
at Avista.Afm.Coordinator.FrmLocateViaCSSAddr..ctor() in c:\Dev\AFM\DevartAndOffice\AFM\Common\Coordinator\frmLocateViaCSSAddr.cs:line 93
at Avista.Afm.Coordinator.Coordinator.RegisterLocators() in c:\Dev\AFM\DevartAndOffice\AFM\Common\Coordinator\Coordinator.cs:line 1986
at Avista.Afm.Coordinator.Coordinator.BeginSession() in c:\Dev\AFM\DevartAndOffice\AFM\Common\Coordinator\Coordinator.cs:line 6622
at Avista.Afm.Coordinator.Coordinator.NewOrOpenSession(ISessionObject tempSession, Boolean dontPromptJustSave) in c:\Dev\AFM\DevartAndOffice\AFM\Common\Coordinator\Coordinator.cs:line 5622

Re: Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Thu 18 Oct 2018 15:55
by Shalex

Re: Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Thu 18 Oct 2018 19:46
by hyiothesia
We had tried setting Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance.CodeFirstOptions.ColumnTypeCasingConventionCompatibility
both to false and true and got the same error either way.
We had to set that property to false when we upgraded to 8.5.497 to get it to work. Note: We are using DB first, not code first, which made that last fix weird. Now that we are upgrading to 9.4.348, it is different again.

When I initially saw the stackoverflow post you provided I didn't realize that it was a different namespace.

I have now tried all 4 combinations of those 2 settings and found that

Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance.CodeFirstOptions.ColumnTypeCasingConventionCompatibility = false;
Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance.Workarounds.ColumnTypeCasingConventionCompatibility = true;

...CodeFirstOptions.ColumnTypeCasingConventionCompatibility = false;
...Workarounds.ColumnTypeCasingConventionCompatibility = false;

...CodeFirstOptions.ColumnTypeCasingConventionCompatibility = true;
...Workarounds.ColumnTypeCasingConventionCompatibility = false;

...CodeFirstOptions.ColumnTypeCasingConventionCompatibility = true;
...Workarounds.ColumnTypeCasingConventionCompatibility = true;

all still fail.

I recently upgraded an EF6 project from 8.5.497 to 9.4.348 and all it did was change the licenses.licx and csproj file versions (and name for EF6 dll) and it worked.

Something about EF4 makes this painful.

I will poke around at any other properties under Workarounds to see if anything helps. In the mean time, if anyone has some other ideas to try I would be very appreciative.

Thanks!

Re: Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Fri 19 Oct 2018 20:25
by hyiothesia
I have created a small application that reproduces the same issue. It is attached. I do have the code for the 3 IntelliTect assemblies as well if needed, but for the sake of less complexity, I excluded those 3rd party dlls. Note, I removed passwords, not that they would help you without the database.

I have shared it on a onedrive folder:
https://1drv.ms/f/s!AmfQDK4utBH5n9RxwKkCkrMwAkjaFA

I just (10/22 @ 3:10 PM Pacific) made a small change to the sample app. I had to add

Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance.CodeFirstOptions.ColumnTypeCasingConventionCompatibility = false;

in the Main method because the initialize method that it is in is NOT called in the sample app.

With this change, the sample works in version 8.5.497, but not with version 9.4.348

Re: Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Mon 22 Oct 2018 23:15
by hyiothesia
It looks to me like this may be a bug. I have used the sample app (see previous post) to test various versions. I only changed the references. The results are below:

8.5.497 - Works
8.5.616 - Works
9.0.7 - Works
9.2.162 - Works
9.3.230 - Works
9.4.348 - failed (get's the error described in this thread)

Re: Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Tue 23 Oct 2018 16:08
by hyiothesia
Tested a few more today:

9.4.280 - failed (get's the error described in this thread)
9.4.314 - failed (get's the error described in this thread)
9.6.597 - failed (get's the error described in this thread)

Looks like the issue (with our implementation of EF4) was introduced in 9.4.280 and is still present in the latest version. For now, I will start testing 9.3.230, but am a little worried given the later fixes for visual studio 2017 that are not included in that build.

Re: Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Tue 23 Oct 2018 17:07
by Shalex
Thank you for your test project. We have reproduced the issue and are investigating it. We will notify you about the result.

Re: Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Tue 23 Oct 2018 17:40
by Shalex
JIC: config.Workarounds.ColumnTypeCasingConventionCompatibility is an outdated option (left for backward compatibility), now it sets config.CodeFirstOptions.ColumnTypeCasingConventionCompatibility internally

Re: Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Fri 26 Oct 2018 09:03
by Shalex
The issue is caused by the fact that both Devart.Data.Oracle.Entity.EF4.dll and Devart.Data.Oracle.Entity.EF5.dll are loaded in the process of your application. We will notify you when the issue is fixed.

As a workaround, please uninstall our provider and reinstall it again with the "Do not install assemblies in the GAC" option turned on in the setup wizard. After this, your application should work.

Re: Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Fri 26 Oct 2018 14:58
by hyiothesia
Thank you. I'll give that a try. We ran into the 10G only issue with 9.3.230, which is fixed in a 9.4 version so this will be great.

Re: Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Fri 26 Oct 2018 19:18
by hyiothesia
We have installed 9.4.348 using the workaround you suggested (checking the option to NOT install assemblies in the GAC) and it seems to be working. Thank you!

Re: Upgrade from 8.5.497 to 9.4.348 results in Schema specified is not valid errors

Posted: Thu 29 Nov 2018 13:59
by Shalex
The bug with loading both Devart.Data.Oracle.Entity.EF4.dll and Devart.Data.Oracle.Entity.EF5.dll in the process of EF4 application is fixed: viewtopic.php?f=1&t=38123.