Not able to create Orgunit , Users in DHIS2

Hey everyone
I have installed the DHIS2 on windows 10, I am using Tomcat 9 and DHIS2 2.35.8. Installations are done smoothly and I am able to access it as well, but the issue is that whenever I try to create orgUnits, User, Tracker, and anything it allows me to fill in the details but as soon as I click on the save it doesn’t save it and generate an error.

Failed to load resource: the server responded with a status of 404 ()
maintenance-200c395ec895609255b3.js:1 API request failed with status 404
Request: GET …/api/29/userDataStore/maintenance

I am not able to resolve this error anybody can please help me what i am doing wrong .
Thanks

Welcome to the community @Tooba!
It might be to your luck because there’s another topic that seems to have had a similar issue so maybe the solution will work for you too! (Seeking help with identifying possible solution in a bug after installing a fresh instance of 2.35.1 - #14 by phil)

I am glad the installation went smoothly, and I hope you are using Java 11! Similarly to that topic, are you using HTTP or HTTPS when you access the instance? Would you like to share the configuration settings (without including sensitive data) if the suggested solution from the other post doesn’t work for you?

Thank you! (:

Hey Thank you for helping me out, I have tried the mentioned solution I have added
scheme=“https” in connection, server.xml but dhis2 stop working and when I removed it, started working again. so now what should I do

Hibernate SQL dialect

      connection.dialect = org.hibernate.dialect.PostgreSQLDialect

      # JDBC driver class
      connection.driver_class = org.postgresql.Driver

      # Database connection URL
      connection.url = jdbc:postgresql:dhis2

      # Database username
      connection.username = dhis

      # Database password
      connection.password = ******

      # Database schema behavior, can be validate, update, create, create-drop
      connection.schema = *****

      # Encryption password (sensitive)
      encryption.password = ******

@Gassim i have added
relaxedQueryChars="^{}[]|""
in Connector (server.xml) but still when i open maintenance and try to create the orgUnit i got the following errors
2

Thanks for the update! We’d need to see the request in the Network tab (F12 -Console, → Network tab, click on the request with red line and then take a screenshot for response and headers).
Thanks!

@Gassim here it is


Okay thanks @Tooba! I tried to search a bit more into this and it seems that similar errors (not exactly the same) but issues occur when the tomcat installation (and maybe the Java installation) aren’t compatible with the DHIS2 instance (https://jira.dhis2.org/browse/DHIS2-7269).

I see that you have installed Tomcat 9 which is good but maybe check if there are any updates that are required. So my suggestion which I took from the related topics mentioned in that old jira issue, is that you try to check your tomcat installation. And for Java, I’d say it’s Java 11? It’s the recommended version now.

Additionally, you would have to clear the browser cache and from the Data Administration app maybe do some maintenance.

Please let me know what you come up with! Thanks! :+1:

@Gassim ill check the tomcat its fine and I am attaching the Java version details below. maybe this needs


some fixing

1 Like

1
@Gassim i have installed tomact8.5.73 and this happens.

in this issues it was given try to change the tomact version I did but nothing happens

Thanks for your patience @Tooba! I see in the error log that you shared the following error:


which indicates that there’s an issue with the memory allocation configuration in your java_opts settings:

Hope this helps! If this or other errors still appear please share. Thanks!