Difference between revisions of "Registry Properties File"

From FMR Knowledge Base
Jump to navigation Jump to search
(File Location)
(File Contents)
 
(3 intermediate revisions by the same user not shown)
Line 27: Line 27:
 
<pre>
 
<pre>
 
INFO localhost-startStop-1 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [fusion_registry.properties]
 
INFO localhost-startStop-1 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [fusion_registry.properties]
15
 
 
INFO localhost-startStop-1 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from URL [file:/C:/Users/<username>/FusionRegistry/fusion_registry.properties]
 
INFO localhost-startStop-1 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from URL [file:/C:/Users/<username>/FusionRegistry/fusion_registry.properties]
 
</pre>
 
</pre>
  
== Tomcat as a Windows Service ==
+
== Using the System Environment Variable ==
If you are running Tomcat as a Windows service, then the Home directory is likely to be: <code>C:\Windows\System32\config\systemprofile</code>
+
Using a System Environment Variable to specify the home location can be useful, particularly if you wish to run multiple Registries on a single server.
 
 
And the file is likely to be located at: <code>C:\Windows\System32\config\systemprofile\MetadataTechnology\FusionRegistry</code>
 
 
 
== Changing the location of the properties file ==
 
The location of your properties file can be changed. This is useful if you either do not want the FMR to store information in the computer’s home directory or if you wish to run multiple Registries on one server.
 
  
To specify a new location you need to set a Java System variable called “RegistryProperties” to the URI value of the location where you wish the properties file to be. If you are running Apache Tomcat as a service please refer to Section 9 of this document. Otherwise the easiest way to achieve this is to create a new file called setenv.bat (or setenv.sh on Unix environments) and place it in the Tomcat’s bin directory. The contents of this file should state the full location of the properties file which must be in the URI format. To illustrate this:
+
To specify a new location you need to set a Java System variable called “RegistryProperties” to the URI value of the location where you wish the properties file to be. Otherwise the easiest way to achieve this is to create a new file called setenv.bat (or setenv.sh on Unix environments) and place it in the Tomcat’s bin directory. The contents of this file should state the full location of the properties file which must be in the URI format. To illustrate this:
  
 
<code>SET JAVA_OPTS=-DRegistryProperties=file:///c:/dir/AFile.txt</code> (For Windows systems)
 
<code>SET JAVA_OPTS=-DRegistryProperties=file:///c:/dir/AFile.txt</code> (For Windows systems)
Line 55: Line 49:
  
 
== File Contents ==
 
== File Contents ==
The file stores three pieces of information:
+
An example of the Properties file in '''Version 10'''
# Database connection details
 
# Directory to use to store temporary files
 
# Root user credentials
 
 
The file looks like this in '''Version 10'''
 
  
 
<pre>  
 
<pre>  
Line 77: Line 66:
 
</pre>
 
</pre>
  
The file looks like this in '''Version 11'''
+
An example of the file in '''Version 11'''
 
<pre>  
 
<pre>  
 
#Modified on Tue Dec 14 13:42:46 GMT 2021
 
#Modified on Tue Dec 14 13:42:46 GMT 2021
Line 97: Line 86:
  
 
Values can be directly modified in the properties file, however an application restart is required for these changes to take effect.  The Fusion Registry User Interface provides an Admin UI to modify any settings (including ones stored in the Registry database) and should be used over direct modification to the file if possible.
 
Values can be directly modified in the properties file, however an application restart is required for these changes to take effect.  The Fusion Registry User Interface provides an Admin UI to modify any settings (including ones stored in the Registry database) and should be used over direct modification to the file if possible.
 +
 +
== Tomcat as a Windows Service ==
 +
If you are running Tomcat as a Windows service, then the Home directory is likely to be: <code>C:\Windows\System32\config\systemprofile</code>
 +
 +
And the file is likely to be located at: <code>C:\Windows\System32\config\systemprofile\MetadataTechnology\FusionRegistry</code>
  
 
== What Happens if the properties file is deleted? ==
 
== What Happens if the properties file is deleted? ==
 
If the properties file is deleted, fear not.  On application server restart, the Fusion Registry will redirect to the Install wizard.  Upon entering the connection details to the database that was previously used, the Registry will detect it is already installed and redirect to the home page.  If the database connection is to a new database, then the remainder of the install wizard should be completed to re-install the product.
 
If the properties file is deleted, fear not.  On application server restart, the Fusion Registry will redirect to the Install wizard.  Upon entering the connection details to the database that was previously used, the Registry will detect it is already installed and redirect to the home page.  If the database connection is to a new database, then the remainder of the install wizard should be completed to re-install the product.

Latest revision as of 10:04, 12 January 2026

Overview

Most of the information that the Registry requires for operation, such as the Structural Metadata and configuration information, is stored in a database. The Registry Properties file contains the connection details for that database. When the Registry starts, one of its initial tasks is to load the Properties file and establish the database connection.

The Registry automatically generates the Properties file the first time it runs. Unless an environment variable specifies a different name, the file name is "fmr.properties".

Because some values in the Properties file are encrypted, it should not be manually edited unless you have been specifically instructed to do so.

Loading the Properties File

The Properties file is read, only during Registry start‑up. Any changes made while the Registry is running will not take effect until the next restart.

  • In FMR version 11, the default location is: <user home>\MetadataTechnology\FusionRegistry
  • In FMR version 12, the default location is: <user home>\SDMX_IO\FMR

Alternative locations can be used if required. When locating the Properties file, the FMR checks several locations in sequence. Initially it checks for a system environment variable ("RegistryProperties") that may specify an absolute file path. If this is not set, it then checks the WEB-INF/classes directory.

The search order is:

  • Check the environment variable
  • Check the WEB-INF/lib folder
  • Check the "Registry Home" location

If no properties file is found, a new file will automatically be created in the "Registry Home" location.

If you are unsure about which of the files Fusion Metadata Registry is using to obtain system information, please look at the start-up log in your web application server. There will be entries like the following:

INFO localhost-startStop-1 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [fusion_registry.properties]
INFO localhost-startStop-1 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from URL [file:/C:/Users/<username>/FusionRegistry/fusion_registry.properties]

Using the System Environment Variable

Using a System Environment Variable to specify the home location can be useful, particularly if you wish to run multiple Registries on a single server.

To specify a new location you need to set a Java System variable called “RegistryProperties” to the URI value of the location where you wish the properties file to be. Otherwise the easiest way to achieve this is to create a new file called setenv.bat (or setenv.sh on Unix environments) and place it in the Tomcat’s bin directory. The contents of this file should state the full location of the properties file which must be in the URI format. To illustrate this:

SET JAVA_OPTS=-DRegistryProperties=file:///c:/dir/AFile.txt (For Windows systems)

export JAVA_OPTS=-DRegistryProperties=file:///dir/AFile.txt (For Unix systems)

It is important to note that FMR will NOT start if this value is incorrect or if this file cannot be created.

To check that this value is being used by the system, check the Registry log during Registry startup and look for a line similar to the following:

Property RegistryProperties has been specified as
file:///c:/dir/AFile.txt

File Contents

An example of the Properties file in Version 10

 
#Modified on Fri Mar 27 07:58:12 GMT 2020
#Fri Mar 27 07:58:12 GMT 2020
database.dialect=org.hibernate.dialect.MySQL55Dialect
database.driver=com.mysql.cj.jdbc.Driver
database.password=oMPSQtPj37lo1hrttvAhkQ\=\=metatech
database.url=jdbc\:mysql\://localhost\:3306/registry_datbabase
database.useCustomString=false
database.username=root
java.tmp=C\:\\Tomcats\\Tomcat-7.0.56-Registry-8080\\temp
security.auth.prov=registry
security.password=$2a$10$fhuzUaxFXv/qEN2hhuEc6O1FKUyHynebocAmWGyayAFPWfweMkpM.
security.username=root

An example of the file in Version 11

 
#Modified on Tue Dec 14 13:42:46 GMT 2021
#Tue Dec 14 13:42:46 GMT 2021
database.dialect=org.hibernate.dialect.MySQL55Dialect
database.driver=com.mysql.cj.jdbc.Driver
database.password=U8q7WdGf5jNUOOHWXXoXVQ\=\=
database.url=jdbc\:mysql\://localhost\:3306/registry_datbabase
database.useCustomString=false
database.username=root
encrypt.password=820619a9-ef55-49e5-beb8-17a1a66b797e
encrypt.salt=94ff1c84-2498-44e3-9b2b-cf4b8c7f8bf6
security.password=$2a$10$lZzxmR1rDOxgjufIO8U7Rep1Z3wXFts85LOt/BdVRhoaWFM.xRuKi
security.username=root


Passwords are encrypted using AES-256 encryption.

Values can be directly modified in the properties file, however an application restart is required for these changes to take effect. The Fusion Registry User Interface provides an Admin UI to modify any settings (including ones stored in the Registry database) and should be used over direct modification to the file if possible.

Tomcat as a Windows Service

If you are running Tomcat as a Windows service, then the Home directory is likely to be: C:\Windows\System32\config\systemprofile

And the file is likely to be located at: C:\Windows\System32\config\systemprofile\MetadataTechnology\FusionRegistry

What Happens if the properties file is deleted?

If the properties file is deleted, fear not. On application server restart, the Fusion Registry will redirect to the Install wizard. Upon entering the connection details to the database that was previously used, the Registry will detect it is already installed and redirect to the home page. If the database connection is to a new database, then the remainder of the install wizard should be completed to re-install the product.