Sync related model results in error

Posts   
 
    
Meindert
User
Posts: 63
Joined: 07-Nov-2012
# Posted on: 01-Aug-2016 08:49:15   

We use version 5.04 and SQL Server 12.0.4459

Error: Actions taken for catalog 'CATENA_ontw' Error: 'Exception caught during retrieval of User defined types: Failed to create AppDomain "master.sys[runtime].3". Exception has been thrown by the target of an invocation.'

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 01-Aug-2016 10:12:38   

Please provide more information so we can try to reproduce it, e.g. do you use UDTs in that catalog, what is the stacktrace etc. Did this occur just now and what changed in the database etc. Is [runtime] the exact message or was there some other info?

Frans Bouma | Lead developer LLBLGen Pro
Meindert
User
Posts: 63
Joined: 07-Nov-2012
# Posted on: 02-Aug-2016 11:44:56   

We don't use version 5.0.4 not that long and the user defined table types are the last types we added, but that is already a while ago. Where can I find the stack trace?

More info you can find in the attachments!

Attachments
Filename File size Added on Approval
UDTs.png 38,273 02-Aug-2016 11:45.15 Approved
UDTs_error.png 43,745 02-Aug-2016 11:45.23 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 02-Aug-2016 14:34:50   

Meindert wrote:

We don't use version 5.0.4 not that long and the user defined table types are the last types we added, but that is already a while ago. Where can I find the stack trace?

More info you can find in the attachments!

Ah you saw the error in the log. Next time, please provide as much info as possible so we don't have to play a guessing game. wink

The application output window docked at the bottom should have a line which states which type was the problem, in the format: "Exception caught while instantiating UDT type '{0}' from assembly '{1}': {2}. Type skipped."

If you don't see this line, but do see the log, something else is going on: it failed during the query below. In that case please try to load the data from that query in a datatable using a simple SqlDataAdapter.Fill operation. That should then give the same error.

We first execute the following query on the catalog

SELECT * FROM sys.assembly_types

this gives a list of types and assemblies.

Now for each of these assemblies, we'll try to instantiate the type with a simple:

udt.TypeInstance = Type.GetType(udt.FullAssemblyName);

This fails if the assembly isn't loadable on the client, i.e. you don't have the assembly stored locally.

Your UDTs seem simple redefines so that doesn't seem to be it. If the query above reveals an assembly which is stored local but you can't instantiate a type from that, that's the reason.

Still, the error is odd, as it occurs likely due to GetType() which is a .net action. Why that can't instantiate a type and gives this weird error, I don't know. If you don't use any of the .NET types installed in your catalog, you can safely ignore this error.

Frans Bouma | Lead developer LLBLGen Pro
Meindert
User
Posts: 63
Joined: 07-Nov-2012
# Posted on: 03-Aug-2016 10:06:58   

Thanks, the problem is in the database and for the moment I safely ignore this error simple_smile

SELECT * FROM sys.assembly_types

results in

Msg 6517, Level 16, State 1, Line 1 Failed to create AppDomain "master.sys[runtime].13". Exception has been thrown by the target of an invocation.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 03-Aug-2016 10:39:55   

Ok, that's indeed an odd problem. Perhaps a service pack is not installed? Anyway, glad it's cleared up simple_smile

Frans Bouma | Lead developer LLBLGen Pro