This project is read-only.

Databases Created using Win 7 and XP not compatible?

Jul 29, 2014 at 4:53 PM
I've created a program that uses NDatabase files and installed it on a Windows 7 machine and a Windows XP machine, but when one tries to open a database created by the other, I get the following exception:

NDatabase has thrown an Exception\nError:10:Internal error : Session.getMetaModel

Please can you tell me how to fix this?
Aug 10, 2014 at 9:35 AM
That's something I've never tested. It looks like internal model is different, that could happen if you are using some .net classes in your models, and on those machines you are using different .net frameworks. It simply means it cannot be understand in win 7 because your model change, so I would try use exactly the same framework on win 7 to check if that help.

Then your role is to find problematic class which was changed, ideally then replace it on win xp with your wrapper class and then migrate your db.

Mar 4, 2015 at 8:01 PM
I just ran across this error as well. I get the following exception when I try to open a database in Windows XP:

2015-03-04 14:41:17.7480 [Error] Unhandled exception NDatabase.Exceptions.OdbRuntimeException:
NDatabase has thrown an Exception
Error:10:Internal error : Session.getMetaModel ---> System.ArgumentException: Given full class name is not enough to create the Type from that: System.Runtime.Remoting.Metadata.RemotingFieldCachedData, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089
at NDatabase.Meta.ClassInfo.CannotInstantiateType(String fullClassName) in c:\TeamCity\Agents\A\BuildAgent\work\9a4cd5884b729548\src\Meta\ClassInfo.cs:line 187
at NDatabase.Meta.ClassInfo.GetType(String fullClassName) in c:\TeamCity\Agents\A\BuildAgent\work\9a4cd5884b729548\src\Meta\ClassInfo.cs:line 177
at NDatabase.Tool.DictionaryExtensions.GetOrAdd[TKey,TItem](Dictionary2 self, TKey key, Func2 produce) in c:\TeamCity\Agents\A\BuildAgent\work\9a4cd5884b729548\src\Tool\DictionaryExtensions.cs:line 15
at NDatabase.Meta.ClassInfo.CheckIfTypeIsInstantiable(String fullClassName) in c:\TeamCity\Agents\A\BuildAgent\work\9a4cd5884b729548\src\Meta\ClassInfo.cs:line 169
at NDatabase.Core.Engine.FileSystemReader.ReadClassInfoHeader(OID classInfoOid) in c:\TeamCity\Agents\A\BuildAgent\work\9a4cd5884b729548\src\Core\Engine\FileSystemReader.cs:line 306
at NDatabase.Core.Engine.ObjectReader.LoadMetaModel(IMetaModel metaModel, Boolean full) in c:\TeamCity\Agents\A\BuildAgent\work\9a4cd5884b729548\src\Core\Engine\ObjectReader.cs:line 78
at NDatabase.Transaction.Session.GetMetaModel() in c:\TeamCity\Agents\A\BuildAgent\work\9a4cd5884b729548\src\Transaction\Session.cs:line 103

That class doesn't exist in mscorlib on my Windows XP VM, but it does on my Windows 7 PC. I wonder if this might be a difference between .NET versions (4.0 and 4.5.x).
Mar 4, 2015 at 8:05 PM
It looks like the same incompatibility exists going from Windows XP to Windows 7, but the error is:

Given full class name is not enough to create the Type from that: System.Reflection.Cache.InternalCache, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089