We upgraded a visual studio project from Data objects v3.7 to Xtensive v5.0.6. When I build the domain against the database that was configured with v3.7, I get an error that says

An exception of type 'System.NotSupportedException' occurred in Xtensive.Orm.dll but was not handled in user code.

‘Type 'Unknown' is not supported.’ What does this error mean?

This is what my sql.log file shows:

2015-09-18 15:05:30.9907 | Info | Xtensive.Orm.Sql | Session 'n/a'. Creating connection. 
2015-09-18 15:05:31.0077 | Info | Xtensive.Orm.Sql | Session 'n/a'. Opening connection 'sqlserver://localhost\SQLSERVER2008/SeasiteDO'. 
2015-09-18 15:05:31.0077 | Info | Xtensive.Orm.Sql | Session 'n/a'. Beginning transaction @ . 
2015-09-18 15:05:31.5907 | Info | Xtensive.Orm.Sql | Session 'n/a'. SQL batch: 
SELECT [a].[Name] AS [Name], [a].[Version] AS [Version] FROM [dbo].[Metadata.Assembly] [a] 
2015-09-18 15:35:11.5292 | Info | Xtensive.Orm.Sql | Session 'n/a'. Creating connection. 
2015-09-18 15:35:11.5522 | Info | Xtensive.Orm.Sql | Session 'n/a'. Opening connection 'sqlserver://localhost\SQLSERVER2008/SeasiteDO'. 
2015-09-18 15:35:11.5662 | Info | Xtensive.Orm.Sql | Session 'n/a'. Beginning transaction @ . 
2015-09-18 15:35:12.2812 | Info | Xtensive.Orm.Sql | Session 'n/a'. SQL batch: 
SELECT [a].[Name] AS [Name], [a].[Version] AS [Version] FROM [dbo].[Metadata.Assembly] [a]

I am only trying to build a single (newly upgraded) entity against our old database. I am using the PerformSafely configuration when building the domain.

*EDIT 9/21/2015*

at Xtensive.Sql.TypeMappingRegistry.MapSqlType(SqlType sqlType)
   at Xtensive.Orm.Providers.StorageDriver.MapSqlType(SqlType sqlType)
   at Xtensive.Orm.Upgrade.SqlModelConverter.ExtractType(TableColumn column)
   at Xtensive.Orm.Upgrade.SqlModelConverter.VisitTableColumn(TableColumn tableColumn)
   at Xtensive.Sql.Model.SqlModelVisitor`1.Visit(Node node)
   at Xtensive.Orm.Upgrade.SqlModelConverter.Visit(Node node)
   at Xtensive.Orm.Upgrade.SqlModelConverter.VisitTable(Table table)
   at Xtensive.Sql.Model.SqlModelVisitor`1.Visit(Node node)
   at Xtensive.Orm.Upgrade.SqlModelConverter.Visit(Node node)
   at Xtensive.Orm.Upgrade.SqlModelConverter.VisitSchema(Schema schema)
   at Xtensive.Orm.Upgrade.SqlModelConverter.VisitCatalog(Catalog catalog)
   at Xtensive.Orm.Upgrade.SqlModelConverter.Run()
   at Xtensive.Orm.Upgrade.SchemaExtractor.GetSchema()
   at Xtensive.Orm.Upgrade.UpgradingDomainBuilder.SynchronizeSchema(Domain domain, SchemaUpgrader upgrader, SchemaExtractor extractor, SchemaUpgradeMode schemaUpgradeMode)
   at Xtensive.Orm.Upgrade.UpgradingDomainBuilder.PerformUpgrade(Domain domain, UpgradeStage stage)
   at Xtensive.Orm.Upgrade.UpgradingDomainBuilder.BuildMultistageDomain()
   at Xtensive.Orm.Upgrade.UpgradingDomainBuilder.Run()
   at Xtensive.Orm.Upgrade.UpgradingDomainBuilder.Build(DomainConfiguration configuration)
   at Xtensive.Orm.Domain.Build(DomainConfiguration configuration)
   at Initializer.Initialize() in c:\Users\####\Documents\Visual Studio 2013\WebSites\WebSite5\App_Code\Initializer.cs:line 26
   at ASP.global_asax.Application_Start(Object sender, EventArgs e) in c:\Users\####\Documents\Visual Studio 2013\WebSites\WebSite5\Global.asax:line 8

asked Sep 18 '15 at 14:50

BrenockCC's gravatar image

BrenockCC
5112

edited Sep 21 '15 at 10:09


One Answer:

Hello BrenockCC

System.NotSupportedExpeption appears when something is not supported by DataObjects.Net. Could you post callstack? It would be helpful for investigation.

Notice that DataObjects.Net has been changed a lot a you have to migrate model and your code to work with it. It's 'just in case' information.

Update Schema contains columns with type which is not supported. It might be some custom type or some very special type because DataObjects.Net supports main types of each RDBMS even some storage-related types like SqlGeometry in some cases.

answered Sep 20 '15 at 23:50

Alexey%20Kulakov's gravatar image

Alexey Kulakov
48215

edited Sep 22 '15 at 00:09

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA