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:0x00007efd178cfbe8> #<Tag:0x00007efd178cfaa8> #<Tag:0x00007efd178cf940> #<Tag:0x00007efd178cf800>

(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