Could not load type 'CoreLab.Common.DbConnection'

Could not load type 'CoreLab.Common.DbConnection'

Postby MiKu » Sun 12 Feb 2006 14:38

We have a DLL that can be started two ways.
Standalone via a EXE Files that has a reference to this DLL.
Embedded into an other Application that allows us to load the DLL
by runtime via a NETLOAD Command.

The Standaloneversuion works find but the Embedded Version
gives us this error since we switched to the Version 3.2 of Corelab.
(With the Versions before 3.2, everthing works fine.....)


On Login to Oracle this comes up on Connection.Open

Description:
Could not load type 'CoreLab.Common.DbConnection' from assembly 'CoreLab.Oracle, Version=3.20.6.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.
Type: System.TypeLoadException

If I remove the Corelab Assemblies from GAC
and place the Corelab DLL's to the BIN Dircetory of our Application
The Standalone version works fine and the Embedded Version
displayes the Error Message before plus:

>>License expired or not valid.

The File "licenses.licx" is embedded in our DLL.
(And it works if starting standalone)


Do you have any Idea what the Problem could be.

As noticed, this Problem appears since we use Corelab 3.2.
With the Versions before we didn't have this Problem.
MiKu
 
Posts: 2
Joined: Sun 12 Feb 2006 14:23

Postby Paul » Mon 13 Feb 2006 09:46

We can reproduce your problem with "Could not load type 'CoreLab.Common.DbConnection'" when COM object is loading in .NET 2.0 framework but COM is written on .NET 1.1. Please check what modules are loaded with your application and that all versions are correct.
Most probably the exception "License expired or not valid" happens because you didn't include "licenses.licx" to the main application file.
Please try downloading OraDirect .NET 3.20.7 from our site. We fixed some problems with licensing there. Additionally we added ability to leave "licenses.licx" in DLL module

OraDirect .NET 3.20.7 allows to create class libraries that can be used with certain executable files. To do this, create a text file named licenses.config and place it next to licenses.licx. In this file enumerate names of executable files that will work with the library, every file name on separate line, for example:

MyApplication.exe
MyAnotherApp.exe
ExtraTool.exe

You do not have to add the file licenses.config to project.
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Could not load type 'CoreLab.Common.DbConnection'

Postby MiKu » Mon 13 Feb 2006 13:13

Thanx for your quick reply

We can't find 3.20.7 under the Download Page

It's only avaliable on the Trialversion Page.

Can you place it as Full Version too, tha would be great :-)

Thanx
Micha
MiKu
 
Posts: 2
Joined: Sun 12 Feb 2006 14:23

Postby Paul » Tue 14 Feb 2006 08:43

Please try again
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Could not load type 'CoreLab.Common.DbConnection'

Postby Tobi » Wed 06 Dec 2006 18:06

I have the same problem here with using CoreLab 3.50.14.0.
While using an .NET 1.1 dll, containing the OracleConnection, within an .NET 2.0 executable, I get this message. I already added the executables - name to the licenses.config file of the dll, but the message didn't disappear.

Thank you for any help !
Tobi
 
Posts: 12
Joined: Wed 06 Dec 2006 17:58

Postby schueler » Wed 06 Dec 2006 18:49

Hello,

I think I have the same problem. Does this have something to do when having the .NET 1.1 and .NET 2.0 version installed. How does .NET link the dll's, maybe it gets confused because the 2.0 and 1.1 version have exactly the same strong name.

Bye,
Rainer
schueler
 
Posts: 17
Joined: Tue 17 May 2005 15:44
Location: Germany

Postby Alexey » Thu 07 Dec 2006 07:30

I have the same problem
Which problem do you two have?
Tobi wrote:I get this message
What message do you get?
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby schueler » Thu 07 Dec 2006 08:42

Here is my exception message:

"Could not load type 'CoreLab.Common.DbConnection' from assembly 'CoreLab.Oracle, Version=3.50.14.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.":"CoreLab.Common.DbConnection"

There is a CoreLab.Oracle.dll with version 3.50.14.0 in my bin\debug folder with exact this public key token. Why is .NET not able to find it?
schueler
 
Posts: 17
Joined: Tue 17 May 2005 15:44
Location: Germany

Postby Alexey » Thu 07 Dec 2006 10:02

When do you get this message? Do you get it locally (remove dll from the Bin folder)?
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby Tobi » Thu 07 Dec 2006 10:34

I get the same message:
"Could not load type 'CoreLab.Common.DbConnection' from assembly 'CoreLab.Oracle, Version=3.50.14.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.":"CoreLab.Common.DbConnection"

what do you mean with:
Do you get it locally


The error occurs always, when using a .NET 1.1 dll using an OracleConnection within a .NET 2.0 application.
Tobi
 
Posts: 12
Joined: Wed 06 Dec 2006 17:58

Postby Alexey » Mon 11 Dec 2006 08:04

We are investigating this problem.
You will be notified on results as soon as possible.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby Tobi » Wed 20 Dec 2006 09:19

Could you reproduce this problem ?
Tobi
 
Posts: 12
Joined: Wed 06 Dec 2006 17:58

Postby Alexey » Fri 29 Dec 2006 08:21

You should use .NET 1.x assembly with .NET 1.x Framework and .NET 2.0 assembly with .NET 2.0 Framework.
You should adjust your application settings to work with COM objects appropriately.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby Tobi » Mon 01 Jan 2007 14:01

We know, that it is not the best way of doing it. But if you are using around 30 components from different vendors within your application, it is important for us, to migrate the dll-s step by step from .NET 1.1 to .NET 2.0. The only dll preventing us from the step-by-step migration is your dll. From our point of view it seems to be an licensing-issue inside your component and not a "real" technical problem. So if you could provide us with a solution, it would prevent us from changing our application within a single day to .NET 2.

Thank you,
Tobi
Tobi
 
Posts: 12
Joined: Wed 06 Dec 2006 17:58

Postby Alexey » Wed 03 Jan 2007 08:14

"Could not load type 'CoreLab.Common.DbConnection' from assembly 'CoreLab.Oracle'" is not licensing problem, but the problem when it is not possible to load base class from another framework.
Inheritor cannot be loaded, because base classes' interfaces are different.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Next

Return to dotConnect for Oracle