Reinstalling Claromentis Services after updating Java on Windows

Overview

Claromentis utilises 3 services that rely on Java and will break when the version of Java installed on the web server is changed. The reason for this is that the services store the contents of the JAVA_HOME system environment variable when they are installed and this variable is used to store the path for the Java install directory.

Affected Services

  • Claromentis Controller
  • Claromentis Java Services
  • Elasticsearch

 

Fix

To remedy this issue follow the below instructions:

An important note here is we've now moved away from Java JRE due to a Java changing how it's licensing works. We have now moved to Adopt Open JDK. Below will outline to to install JDK.

 

Download OpenJDK

1.) Browse to the adoptopenJDK website and download and install OpenJDK 15 for the correct version of Windows.

 

2.) Run the installer and choose the installation path [ /Claromentis/software/adoptopenjdk ].

 

Update JAVA_HOME Variable

1.) Go to the start menu and search for 'system environment' variable and click the [Edit system environment variables] result.


 

2.) Select [Environment Variables]


3.) Navigate to the [JAVA_HOME] variable and select [Edit].


 

4.) Update the [Variable Value] with the new Java installation directory [ C:\Claromentis\Software\adoptopenjdk ].


 

5.) Click [OK] to save changes.

 

Edit [Path] System Variable

1.) Navigate to the [Path] system variable and click on [Edit].

 

2.) In the [Variable Value] field, navigate to the old Java path [ ie. C:\Program Files (x86)\Java\jre1.8.0_45\bin ]. This path can vary depending on the version of JDK installed.  Delete this path entry.

 

3.) Replace with [ %JAVA_HOME%\bin ]

 

4.) Click [OK] and [OK] to save all changes.

 

Remove and reinstall the services

1.) Open the Windows [Services] panel and stop the Claromentis and Elasticsearch services.


 

2.) Open [Command Prompt] and right click to [Run as administrator].


 

3.) In the Command Prompt window run the following commands [ sc delete claromentissvcctrl ] and [ sc delete claromentisservices ]. You should see a '[SC] DeleteService SUCCESS' each time if the deletion worked correctly. If you get an error make sure that the services are stopped and that the name is typed correctly.


 

4.) Change directory within Command Prompt to the document converter windows services using  [ cd \Claromentis\document_converter\windows ]. You may need to change drive first if the Claromentis directory is on a drive other than C:. You can do this by typing the drive letter (ie. D: ) followed by a colon and hitting return.

 

5.) Now type [ svc.bat install ] and hit return to install the Claromentis services and then [ svc.bat start ] to start them.


 

6.) If an error occurs indicating that svc.bat is not a recognized command, a dot [ . ] and backslash [ \ ] will need to be added before the cmdlet. At the command line, enter  [ .\svc.bat install ] and hit return to install the Claromentis services and then [ .\svc.bat start ] to start them.

 

7.) In the services right click Elasticsearch...  > Properties > and copy [Service name:]. This 'service name' can vary depending on the version of Elasticsearch installed. The below is an example [ elasticsearch-service-x64 ].

 

8.) Back in the command prompt, change directory again to the Elasticsearch bin directory using [ cd \Claromentis\Software\Elasticsearch\bin ] and then run [ sc delete 'servicename' ] and then in the same directory run [ service install ]. This will remove and then reinstall the Elasticsearch service. If you get an error stating that it cannot find the Java exe you should check that the JAVA_HOME variable you set earlier is correct. If this was incorrect then you will need to remove and reinstall both the Claromentis services and the Elasticsearch service once you have corrected it.


 

9.) Now you will need to set the Claromentis Java service and the Elasticsearch service to 'Automatic' to ensure that it starts when the server does. Open the Windows Services panel and right click on the [Claromentis Java service], select [Properties].


 

10.) Choose [Automatic] from the [Startup type] dropdown menu.

 

11.) Now make sure all 3 services are started. If you cannot start any of the services repeat the process again or contact Claromentis Support for assistance.

Last modified on 30 November 2023 by Hannah Door

Was this helpful?  

Share