Borland Enterprise Server License error: license.ini file is corrupt or invalid
During start-up of a VisiBroker based CORBA application, the following message is printed to stdout:
Borland Enterprise Server License error: license.ini file is corrupt or invalid. Please contact Tech Support or reinstall the product.
After the message is printed the process exits.
The license.ini file is normally located in the /var sub-folder of the VisiBroker installation. The ORB can only access the file if the following conditions are fulfilled:
- The VisiBroker configuration points to the right folder. Some customer applications may not use the default folder, but store the license relevant files in a different location.
- The file exists.
- The current user starting the application has read access to the license.ini file.
- The file is not corrupted.
Configuration of VisiBroker for C++
The C++ ORB requires the environment variable BES_LIC_DIR to point to the /var sub-folder of the VisiBroker installation, or to an alternative location containing all files of the /var folder.
Verify where the environment variable is set and that it points to the correct folder. Your application may use the script file included in VisiBroker to prepare the environment. In that case, verify <VBROKERDIR>/bin/vbroker.bat ( Windows ) or <VBROKERDIR>/bin/vbroker.sh ( Unix ).
If BES_LIC_DIR points to the correct folder, check whether the license.ini file exists and verify the access rights for the current user.
Configuration of VisiBroker for Java
For the Java ORB, the Java System Property borland.enterprise.licenseDir needs to point to the /var sub-folder of the VisiBroker installation, or an alternative location containing the files of the /var folder.
If your application uses the vbj starter tool, verify the settings in <VBROKERDIR>/bin/vbj.config. Otherwise check where your application sets the borland.enterprise.licenseDir - can be in start scripts, in source code, etc. - and ensure it points to the correct location.
If the JVM property points to the right folder, check if the license.ini file exists and verify the access rights for the current user.
File does not exist
If the configured location for the license directory is not the default /var sub-folder of the VisiBroker installation, you may copy the file from the default location. Otherwise copy it from a working VisiBroker installation, or consider a full re-installation, since possibly other files are missing too.
File access rights
The current user who tries to start the CORBA based application needs at least read access to the license.ini file and the folder in which it is located. If the access rights are not sufficient, adapt them.
If all above possibilities can be excluded, the file may be corrupted. For most VisiBroker versions and configurations the file should contain two comment-lines starting with the # character, followed by a single line with the configuration entry
A less obvious problem can be the file format, for example an installation on a Unix host was remotely edited from a Windows host. The control codes to end a line in a text file differ between Windows and Unix. Most Unix Operating Systems offer the tool dos2unix which may be used to repair the license.ini file in this case.
If you are unsure, you may copy the license.ini file from a working VisiBroker installation, or consider a re-installation of the product.