Runtime licensing

Runtime licensing

Postby SuperCow » Wed 07 Apr 2010 18:10

We have purchased a team license of dotConnect for Oracle version 5.35. We are developing on VS 2008 for ASP.NET 3.5 and using NUnit 2.5 for unit testing. Everything works for the developers on localhost, but we are trying to run NUnit tests on our Team City server and the compile succeeds but the the unit tests fail with this error:

SetUp method failed. Devart.Data.Linq.LinqCommandExecutionException : Error on opening DbConnection.
----> Devart.Data.Oracle.OracleException : License not valid due to the problems with dotConnect for Oracle installation.

We need to test the application in a runtime environment and need to know what files need to be copied across without installing DevArt on the destination test server. We cannot install DevArt because we want a test server that will mimick the runtime environment.

I have tried to put Post-build events into the compile as follows:

copy $(SolutionDir)Externals\Devart.Data.Oracle.Linq.dll "$(SolutionDir)Automated Tests\bin"
mkdir "$(SolutionDir)Automated Tests\bin\Properties"
copy $(SolutionDir)Externals\licenses.licx "$(SolutionDir)Automated Tests\bin\Properties"

This resolved an earlier error we were getting:

SetUp method failed. System.IO.FileNotFoundException : Could not load file or assembly 'Devart.Data.Oracle.Linq, Version=1.0.28.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The system cannot find the file specified.

Although I am not sure it was the best solution for that problem either.

Please let me know what needs to be done.
SuperCow
 
Posts: 6
Joined: Wed 07 Apr 2010 17:34

Postby Alladin » Thu 08 Apr 2010 10:22

We cannot install DevArt because we want a test server that will mimick the runtime environment.

You probably can, you just don’t want.

To install design-time (e.g. build-time) licence on build server, you have to install devart package there thought minimal installation type is sufficient.

You know, the guys are competing with Oracle, they have to protect their IP every possible way.
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Postby StanislavK » Thu 08 Apr 2010 10:29

The license resource should be build on the machine where dotConnect for Oracle is installed. After that, you may add it as an embedded resource and compile the application on the build server. Please see the License topic in our documentation for more details.

Please tell us if this helps.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby SuperCow » Thu 08 Apr 2010 15:54

StanislavK wrote:The license resource should be build on the machine where dotConnect for Oracle is installed. After that, you may add it as an embedded resource and compile the application on the build server. Please see the License topic in our documentation for more details.

Please tell us if this helps.


Are you referring to the licenses.licx file or the *.licenses file that gets built when you follow the instructions to compile the license manually. If it is the former, it is already included as an embedded resource in both out data model project and our data model test project.

Following the instructions to compile manually does not resolve the problem (the target application is a DLL not an exe, although it still worked to create a licenses file), and if I rename the file as it states to dll.licenses then the compile fails locally with the error:

Resource identifier 'NAVPass.Model.Data.dll.licenses' has already been used in this assembly

I suspect that it is in conflict with the licenses.licx file in this case.

On a side note, when I try to invoke Tools-->Oracle-->License Information, I get a message box with "Object reference not set to an instance of an object.", followed by the expected "License Information" dialog, only the dialog is blank with only a "Close" button.
SuperCow
 
Posts: 6
Joined: Wed 07 Apr 2010 17:34

Postby StanislavK » Fri 09 Apr 2010 06:28

I meant the *.licenses file. Is your solution a precompiled web application or a web site compiled on demand? In the second case, you should create app_licenses.dll as it is described here:
http://www.devart.com/dotconnect/oracle/docs/Licensing.html#asp
Also, you may send us a small project with which the problem can be reproduced, so that we are able to investigate the license problem in details.

As for the problem with the License Information dialog, such issue occurred with earlier versions of dotConnect for Oracle on some specific types of projects. It was fixed in the 5.55.97 Beta build; please try using the latest 5.60.120 version of dotConnect for Oracle:
http://www.devart.com/forums/viewtopic.php?t=17514
Provided that you purchased the license less than a year ago, you may download the licensed version from Registered Users' Area:
http://secure.devart.com/
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby SuperCow » Wed 21 Apr 2010 19:21

I've finally found some time to try to address this issue again.

We upgraded to 5.60.120 as suggested, and it did fix the bug in the License Information dialog, as well as improve the interface in general.

The other licensing issue still exists though.

Our software is a precompiled web application, so I don't think the app_licenses should apply. I have tried creating a licenses.config file and putting it in the same folder as the licenses.licx file. It contains the following:

Code: Select all
C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe
C:\TeamCity\buildAgent\launcher\bin\TeamCityAgentService-windows-x86-32.exe
C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.x86.exe
C:\TeamCity\bin\tomcat6.exe


These are all the processes that are kicking off in the TeamCity application.

I also tried compiling manually a licenses file for the project and making it an embedded application with this command line:

Code: Select all
"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\lc.exe" /target:"C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.x86.exe" /complist:C:\trunk\Externals\licenses.licx /i:C:\trunk\Externals\Devart.Data.Oracle.dll


I also tried it with the data model DLL as the target, but that did not work either. The licenses.licx file contains:

Code: Select all
Devart.Data.Oracle.OracleConnection, Devart.Data.Oracle, Version=5.60.120.0, Culture=neutral, PublicKeyToken=09af7300eec23701


I don't think it would help to send a small project with the problem. The application compiles fine and testing through NUnit works as well. When the TeamCity application automatically gets the latest files, it builds correctly as well, but fails on the automated NUnit testing. If I sent a project, you would run it and it would work fine locally. The problem is getting it to run the tests remotely, and trying to figure out what is wrong with the licensing as the web page with the information is quite complicated and does not seem to fix our issue.

Is there something fundamental that we are doing wrong or does the license not allow this scenario?
SuperCow
 
Posts: 6
Joined: Wed 07 Apr 2010 17:34

Postby StanislavK » Thu 22 Apr 2010 11:08

Please try removing the full paths to the executables from licenses.config leaving only their names. After that, please recompile your application.

Also, please check that you have the proper DbProviderFactories entry in machine.config of the test machine:
http://www.devart.com/dotconnect/oracle/docs/Deployment.html

If the problem persists, please specify if you are getting the same error message or any other error message with the current configuration.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby SuperCow » Thu 22 Apr 2010 14:21

I changed the licenses.config file to this:

Code: Select all
JetBrains.BuildServer.NUnitLauncher.exe
TeamCityAgentService-windows-x86-32.exe
JetBrains.TeamCity.PlatformProcessRunner.x86.exe
tomcat6.exe


I also added the DbProviderFactory entry from your link, except I replaced "Version=5.35.57.0" with "Version=5.60.120.0". I still get the same error. When the version was still 5.35 I do get a different error message "Could not load file or assembly 'Devart.Data.Oracle, Version=5.35.57.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference."

I went through and made sure that all versions of all DLLs on the TeamCity server were the latest versions, searching on the entire server to make sure there were no latent DLLs being referenced from some unknown location.
SuperCow
 
Posts: 6
Joined: Wed 07 Apr 2010 17:34

Postby StanislavK » Fri 23 Apr 2010 15:26

Please send us the built license resource (*.licenses) so that we are able to investigate the licensing problem in details.

Also, you may perform the Minimal installation of dotConnect for Oracle on your test server. This type of installation is allowed to be made on target machines as well.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby SuperCow » Wed 28 Apr 2010 17:07

We ended up doing a minimal installation on the test server. We have a test web server for our application, and tested our deployment and running of the application there. There was no licensing issues in this environment, so the need to prove we could deploy without an installation on the test server was no longer necessary.

With the minimal installation, there are no more issues on the TeamCity server.
SuperCow
 
Posts: 6
Joined: Wed 07 Apr 2010 17:34


Return to dotConnect for Oracle