Trying 30 day trial. Get "Devart.Common.LicenseException: Feature is not supported."

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
johanrex
Posts: 5
Joined: Fri 08 Sep 2017 12:37

Trying 30 day trial. Get "Devart.Common.LicenseException: Feature is not supported."

Post by johanrex » Wed 20 Sep 2017 13:05

I have created a .NET Core console program with the below code:

Code: Select all

using System;
using Devart.Data.Oracle;
using System.Diagnostics;

namespace consoledevart
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Before");

            string connStr = "Data Source = oraclexe; User ID = testuser; Password = secret;";

            using (OracleConnection conn = new OracleConnection(connStr))
            {
                conn.Open();
                var cmd = conn.CreateCommand();
                cmd.CommandText = "select * from user_tables";

                var reader = cmd.ExecuteReader();

                reader.Read();
                string col = reader.GetString(0);

                Console.WriteLine("From view: " + col);
            }

            Console.WriteLine("After");
        }
    }
}
I have added a licenses.config file to the project and set the "Copy to Output Directory" to True. It has the following two lines:

Code: Select all

consoledevart.dll
consoledevart.exe
I have added a licenses.licx file to the project with this single row content:

Code: Select all

Devart.Data.Oracle.OracleConnection, Devart.Data.Oracle
I use the .NET Core 1.1 target runtime. The program works correctly on Windows. When I copy the published folder to a docker container running CentOS Linux I get the following error:

Code: Select all

[root@2018ac6b9ced 1.1.2]# pwd
/samsserver/shared/Microsoft.NETCore.App/1.1.2
[root@2018ac6b9ced 1.1.2]# ./dotnet  /samsserver/PublishOutput/consoledevart.dll
Before

Unhandled Exception: Devart.Common.LicenseException: Feature is not supported.
   at d.le.clv.Vld(Int32 pe)
   at Devart.Data.Oracle.OracleInternalConnection..ctor(b0 connectionOptions, OracleInternalConnection proxyConnection)
   at Devart.Data.Oracle.bz.a(g A_0, Object A_1, DbConnectionBase A_2)
   at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, g A_1, DbConnectionBase A_2)
   at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
   at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
   at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)
   at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
   at Devart.Common.DbConnectionBase.Open()
   at Devart.Data.Oracle.OracleConnection.Open()
   at consoledevart.Program.Main(String[] args)
Aborted
[root@2018ac6b9ced 1.1.2]#
What is causing the "Devart.Common.LicenseException: Feature is not supported" error? My goal is to evaluate if our organisation can use dotConnect for Oracle on a CentOS/redhat docker container.

johanrex
Posts: 5
Joined: Fri 08 Sep 2017 12:37

Re: Trying 30 day trial. Get "Devart.Common.LicenseException: Feature is not supported."

Post by johanrex » Fri 22 Sep 2017 10:04

I solved the issue by adding the string "license key = trial:/absolute/path/to/Devart.Data.Oracle.key;" to the connection string. I don't find this anywhere in the documentation. It was only in a post in this forum. Please add it to the documentation.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Trying 30 day trial. Get "Devart.Common.LicenseException: Feature is not supported."

Post by Shalex » Mon 25 Sep 2017 08:52

Thank you for confirming the fix.

The documentation is updated. It will be uploaded (available in public) soon.

Post Reply