Logic module 0.5.2 error (Unable to start OpenMRS. Error thrown was: The following modules are marked as 'core' by OpenMRS but were unable to start: logic v0.5.2, )

logic
reporting
module
reports
Tags: #<Tag:0x00007f88cd80bd50> #<Tag:0x00007f88cd80bc10> #<Tag:0x00007f88cd80bad0> #<Tag:0x00007f88cd80b738>

(James Mbabazi) #1

At PIH, some of our site servers had the error below whic caused openmrs not to start

The following error occurred at startup:

Unable to start OpenMRS. Error thrown was: The following modules are marked as ‘core’ by OpenMRS but were unable to start: logic v0.5.2, org.openmrs.module.ModuleException: Unable to start OpenMRS. Error thrown was: The following modules are marked as ‘core’ by OpenMRS but were unable to start: logic v0.5.2, at org.openmrs.web.WebDaemon.startOpenmrs(WebDaemon.java:64) at org.openmrs.web.Listener.contextInitialized(Listener.java:144) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5019) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5513) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622) at java.lang.Thread.run(Thread.java:748) Caused by: org.openmrs.module.OpenmrsCoreModuleException: The following modules are marked as ‘core’ by OpenMRS but were unable to start: logic v0.5.2, at org.openmrs.module.ModuleUtil.checkOpenmrsCoreModulesStarted(ModuleUtil.java:920) at org.openmrs.module.ModuleUtil.startup(ModuleUtil.java:135) at org.openmrs.api.context.Context.startup(Context.java:842) at org.openmrs.web.Listener.startOpenmrs(Listener.java:188) at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42) See the server log for full output.

Looking into the log files, we realised that the cause of this was the error

ERROR - JDBCExceptionReporter.logExceptions(234) |2018-07-19 16:11:29,083| Value ‘0000-00-00 00:00:00’ can not be represented as java.sql.Timestamp {code}

To solve this, we appended &zeroDateTimeBehavior=convertToNull to the connection.url in the openmrs-reuntime-properties file

The connection.url paramenter would look like below

connection.url=jdbc:mysql://localhost:{{port_number}}/openmrs?autoReconnect=true&sessionVariables=storage_engine=InnoDB&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull

We use openmrs 1.9.11 and Ubuntu 16.04


(Daniel Kayiwa) #2

Thanks @jmbabazi for sharing the solution! :slight_smile:


(Benjamin Mwau) #3

Hello Guys,

I’m getting this error. Kindly need your help in fixing it

OpenMRS is not able to start. The following error occurred at startup: OpenMRS requires Java 6, but is running under 1.8.0_191

org.openmrs.api.APIException: OpenMRS requires Java 6, but is running under 1.8.0_191 at org.openmrs.util.OpenmrsUtil.validateJavaVersion(OpenmrsUtil.java:1201) at org.openmrs.web.Listener.contextInitialized(Listener.java:116) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4643) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5109) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1651) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1571) at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:294) at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:212) at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607) at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348) at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)


(Daniel Kayiwa) #4

Duplicate for Error when running OpenMRS


(Benjamin Mwau) #5

Getting this error!

Kindly help.

403 Access Denied

You are not authorized to view this page.

By default the Manager is only accessible from a browser running on the same machine as Tomcat. If you wish to modify this restriction, you’ll need to edit the Manager’s context.xml file.

If you have already configured the Manager application to allow access and you have used your browsers back button, used a saved book-mark or similar then you may have triggered the cross-site request forgery (CSRF) protection that has been enabled for the HTML interface of the Manager application. You will need to reset this protection by returning to the main Manager page. Once you return to this page, you will be able to continue using the Manager application’s HTML interface normally. If you continue to see this access denied message, check that you have the necessary permissions to access this application.

If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.

For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.

<role rolename=“manager-gui”/> <user username=“tomcat” password=“s3cret” roles=“manager-gui”/>

Note that for Tomcat 7 onwards, the roles required to use the manager application were changed from the single manager role to the following four roles. You will need to assign the role(s) required for the functionality you wish to access.

  • manager-gui - allows access to the HTML GUI and the status pages
  • manager-script - allows access to the text interface and the status pages
  • manager-jmx - allows access to the JMX proxy and the status pages
  • manager-status - allows access to the status pages only

The HTML interface is protected against CSRF but the text and JMX interfaces are not. To maintain the CSRF protection:

  • Users with the manager-gui role should not be granted either the manager-script or manager-jmx roles.
  • If the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session.

For more information - please see the Manager App HOW-TO.


(Daniel Kayiwa) #6

Which url are you trying to access?