OpenMRS Core 2.5.0 Installation Java Error

Installation error on ubuntu 20 server x64, tomcat8, openJDK11, mysql8 failing with multiple “Error creating bean with name” at the very last step of updating database. Do assist please with more pointers.

What happens when you downgrade JDK to 1. 8 and re-do the process?

@mzeeocen We currently support Tomcat 8.5+ and 9 for Platform 2.5.0 check OpenMRS Platform 2.5.0 Released – OpenMRS.org and Tomcat Version with deprecation of Tomcat7

Are you running running on Tomcat 8.5+ ?

Can you also provide your error log at pastebin.com ?

same error still persists, here is java version

java -version

openjdk version “1.8.0_312” OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07) OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)

Tomcat version: # Apache Tomcat/8.5.75

Below link to error in pastebin

Can you delete the whole installation and try again and we see what happens.

done that, deleted openmrs from webapps & re extracted new one, same failure at 99%.

Let me Analyse this to see the real cause

Invocation of init method failed; nested exception is org.hibernate.search.exception.SearchException: HSEARCH000103: Unable to initialize IndexManager named 'org.openmrs.ConceptComplex'

@mzeeocen try to cd into your openmrs installation directory and check the read / write permissions with ls -la and let’s see the results .

RW permissions to tomcat

/var/lib/tomcat8/webapps/openmrs# ls -la total 28

drwxr-xr-x 5 tomcat tomcat 4096 Feb 16 15:34 . drwxr-x— 8 tomcat tomcat 4096 Feb 16 15:34 … drwxrwxr-x 2 tomcat tomcat 4096 Dec 22 13:37 images -rw-rw-r-- 1 tomcat tomcat 1869 Dec 22 13:37 index.htm -rw-rw-r-- 1 tomcat tomcat 853 Dec 22 13:24 initialsetup drwxr-xr-x 3 tomcat tomcat 4096 Feb 16 15:34 META-INF drwxr-xr-x 7 tomcat tomcat 4096 Feb 16 15:36 WEB-INF

Delete the folder named lucene in your application data folder and then restart tomcat.

1 Like

Hello all, i seem to have got it working now. The problem was RW rights to /var/lib/OpenMRS, tomcat could not write to this dir & installation could not proceed. Thanks all.

2 Likes

@here Am getting same error https://pastebin.com/y8HNhkjm. I have all the drwxr-xr-x privileges in place

mysql> select version();
+---------------+
| version()     |
+---------------+
| 5.6.16-1~exp1 |
+---------------+
1 row in set (0.00 sec)

openmrs 2.3.3

@aojwang @dkayiwa @mzeeocen

@injiri What are you doing ?

@injiri delete the lucene folder in your application data directory and restart OpenMRS.

@tendomart this occurred unexpectedly when redeploying modules on the server. Deleting the lucern folder in the OpenMRS directory did not work.

Hi @injiri most of our sites experienced the error early this week and we resolved it by making some changes to the tomcat service file. We made the following changes:

[Service]
ReadWritePaths=/var/lib/OpenMRS/

# Logging
#SyslogIdentifier=tomcat9
StandardOutput=append:/var/log/tomcat9/catalina.out
StandardError=append:/var/log/tomcat9/catalina.out

You can adapt the changes as appropriate. You can also refer to the attached file tomcat9.service.txt (1.1 KB)

2 Likes

Hi @aojwang
That resolved my issue. Looks like ubuntu auto-updated the tomcat9 instance doing away with the customization we had earlier done on the tomcat9.service file.

1 Like

Great to hear. Thanks