Connecting to Oracle under Mono / OpenSuse

Connecting to Oracle under Mono / OpenSuse

Postby Laurence » Tue 10 Jan 2017 12:12

I am trying to evaluate dotconnect with mono (v. 4.6.1) under OpenSuse (v. 42.2) and Oracle 12. I didn't find any mono-specific documentation for dotconnect so I'm flying blind here...

My test program works fine using dotconnect with Windows 7. It also works fine using the Oracle managed driver (Oracle.ManagedDataAccess.Client) on mono/linux.

When I try to use dotconnect with mono/linux I get the exception shown below. The exception seems to be installation-related. Is there any specific installer required to use mono, or do you have any other suggestions for me?

Thanks in advance for any assistence you can provide!

---------------------------------------------------------------------------------------------------------------------------------------
Devart.Data.Oracle.OracleException (0x80004005): Cannot retrieve information from registry to check if the Devart provider is installed. This issue occurs when generating or validating the license resource. The details of the problem: No access to the given key
at DbLib.OracleDevArtDB.BulkCopy (System.String tableName, System.Data.DataTable dt) [0x00111] in /home/intalus/GcxWorkspace/OracleDbTest/DbLib/OracleDevArtDB.cs:672
at DbLib.CcDb.BulkCopy (System.String table, System.Data.DataTable dt) [0x00009] in /home/intalus/GcxWorkspace/OracleDbTest/DbLib/CcDb.cs:256
at GrandCentralCleanup.DbUtil.BulkCopy (System.String connStr, System.String tableName, System.Data.DataTable data) [0x00020] in /home/intalus/GcxWorkspace/OracleDbTest/WmImport/DbUtil.cs:607
at WmImportTest.WmImporter.BulkImport (System.Int32 amount) [0x00078] in /home/intalus/GcxWorkspace/OracleDbTest/WmImport/WmImporter.cs:356
---------------------------------------------------------------------------------------------------------------------------------------
Laurence
 
Posts: 2
Joined: Tue 10 Jan 2017 11:46

Re: Connecting to Oracle under Mono / OpenSuse

Postby Shalex » Tue 10 Jan 2017 15:23

dotConnect for Oracle supports Mono. However our provider can't be installed on Linux. You should install dotConnect for Oracle on a computer with a Windows OS and then copy the required assemblies like Devart.Data.dll and Devart.Data.Oracle.dll to Linux.

Laurence wrote:Devart.Data.Oracle.OracleException (0x80004005): Cannot retrieve information from registry to check if the Devart provider is installed. This issue occurs when generating or validating the license resource. The details of the problem: No access to the given key
When you create an application that uses Devart assemblies, it must have a license resource embedded into application assembly. A license information is checked when a connection is opened. As you can't install dotConnect for Oracle on Mono, you should compile the license resource manually on a Windows computer, then copy it to the Mono computer and attach it to your project as an Embedded Resource.
Shalex
Devart Team
 
Posts: 7542
Joined: Thu 14 Aug 2008 12:44

Re: Connecting to Oracle under Mono / OpenSuse

Postby Laurence » Wed 11 Jan 2017 10:13

Thanks for your help.

I am calling the DevArt assemblies from a library - do I have to add the .licx file to the main program executable, or to the library?
Laurence
 
Posts: 2
Joined: Tue 10 Jan 2017 11:46

Re: Connecting to Oracle under Mono / OpenSuse

Postby Shalex » Wed 11 Jan 2017 16:21

Our license validator looks for the valid license in the following way:
YourApp.exe -> YourLibrary.dll -> Devart.Data.Oracle.dll

The valid license for *.exe has to be available at any level of this chain: either built in YourApp.exe (license resource), or added to YourLibrary.dll (license recource with the name of target *.exe).

For example, you decided to add the license resource to YourLibrary.dll. Refer to http://www.devart.com/dotconnect/oracle/docs/Licensing.html#compile , generate the license resource dll.licenses on your Windows (where dotConnect for Oracle is installed), then add this dll.licenses to your YourLibrary project as embedded resource on Linux, rebuild YourLibrary.dll.

Now run your YourApp.exe again, does it work? If not:
1) specify the exact text of the current error and its stack trace
2) did you decide to add the license resource to YourApp.exe or to YourLibrary.dll?
3) send us the generated resource *.licenses
Shalex
Devart Team
 
Posts: 7542
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle