I stopped LegacyUI module and now I cant start it back

Application Name: Bahmni Version Number: 2.1

Question:

So I was playing with the module management by replace a legacyUI module from 1.2.4.Snapshot with the 1.3.2. Then I stopped the legacyUI module and also restarted the application.

What I have tried

  1. Stop the application.
  2. Remove the legacyUI 1.3.2 module
  3. Start the application.
  4. Stop the application
  5. Add the legacyUI 1.2.4 Snapshot module
  6. Start the application

Now I cant access the UI at all and I get the following errors in the openmrs.log

 [ERROR] ModuleFactory - Could not start some modules because they depend on others which are not started. Please first start them or use the "Start All" button on the "Manage Modules" page: [emrapi->webservices.rest, idgen-webservices->idgen, emrapi->metadatamapping, metadatamapping->legacyui, calculation->legacyui, addresshierarchy->legacyui, metadatasharing->legacyui, providermanagement->legacyui, reporting->htmlwidgets, webservices.rest->legacyui, appframework->webservices.rest, idgen->webservices.rest, bahmni.ie.apps->webservices.rest, emrapi->providermanagement, emrapi->reporting, emrapi->metadatasharing, idgen-webservices->webservices.rest, metadatasharing->metadatamapping, htmlwidgets->legacyui, metadatamapping->webservices.rest, reporting->legacyui, reporting->calculation]
org.openmrs.util.CycleException: [emrapi->webservices.rest, idgen-webservices->idgen, emrapi->metadatamapping, metadatamapping->legacyui, calculation->legacyui, addresshierarchy->legacyui, metadatasharing->legacyui, providermanagement->legacyui, reporting->htmlwidgets, webservices.rest->legacyui, appframework->webservices.rest, idgen->webservices.rest, bahmni.ie.apps->webservices.rest, emrapi->providermanagement, emrapi->reporting, emrapi->metadatasharing, idgen-webservices->webservices.rest, metadatasharing->metadatamapping, htmlwidgets->legacyui, metadatamapping->webservices.rest, reporting->legacyui, reporting->calculation]
        at org.openmrs.util.Graph.topologicalSort(Graph.java:170)
        at org.openmrs.module.ModuleFactory.getModulesInStartupOrder(ModuleFactory.java:347)
        at org.openmrs.module.ModuleFactory.startModules(ModuleFactory.java:235)
        at org.openmrs.module.ModuleUtil.startup(ModuleUtil.java:129)
        at org.openmrs.api.context.Context.startup(Context.java:832)
        at org.openmrs.web.Listener.startOpenmrs(Listener.java:244)
        at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
INFO 8/9/17 4:14 PM:liquibase: Reading from `liquibasechangelog`

and this on the browser

If you are seeing this page, it means that the OpenMRS Platform is running successfully, but no user interface module is installed. Learn about the available User Interface Modules

How can I start back the module or fix the above issue without accessing the UI ?

Hi @abiieez

Can you please restart the server and see whether the legacy UI module is started?

Here when you stop the legacy UI module, there will be some modules stopped automatically which depended on the legacyUI module. So you can simply click on START ALL button to start all the modules.

The legacy UI is not started.Thus I cant see any START ALL button.

This is what I am seeing

Is there a way I can start all modules from mysql ?

Go to the “global_property” table and set the value of all properties of format “moduleid.started” to true

Then restart tomcat.

2 Likes

Thanks got it working now.

vApplication Name: openmrs-module-legacyui Version Number: legacyui-1.5.0

Question: Hi All,

i have done with openmrs-core-master and openmrs-module-legacyui while accessing the application i am getting below exception. Exception

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1287) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857) javax.servlet.http.HttpServlet.service(HttpServlet.java:635) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.openmrs.web.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:65) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:73) org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:57) org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:109) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) Root Cause

Can you paste the stack trace at pastebin.com?

I am playing with Module Managment and stopped legacyui module. So, I searched how to start it again. As @dkayiwa said I modified the property_value to true for the legacyui.started property in global_property table. Even then the module is not starting instead I am getting the following errors [https://pastebin.com/pdCrNixe] . Can someone help me out?

I was able to find the issue. legacyui module is starting after chaning the property_value as true but the error is caused while starting formentry module.

The default datetime is given as ‘0000-00-00 00:00:00’. But the supported range is ‘1000-01-01 00:00:00’ to ‘9999-12-31 23:59:59’ according to mysql. Do we need to change the default value ? Is this the real issue?

What is the value for connection.url in your runtime properties file?

connection.url=jdbc:mysql://localhost:3306/openmrs?autoReconnect=true&sessionVariables=default_storage_engine=InnoDB&useUnicode=true&characterEncoding=UTF-8

Can you append this to the connection url and restart openmrs &zeroDateTimeBehavior=convertToNull

Server is starting but showing the same mysql error (Invalid default value for ‘date_created’)

What is your current connection.url and what version of MySQL are you using?

Current connection.url=jdbc:mysql://localhost:3306/openmrs?autoReconnect=true&sessionVariables=default_storage_engine=InnoDB&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull and My MySql version is 5.7.23

Stop tomcat, delete the logs. Start tomcat and try start this module. Then share the new logs.