Investigated this well but not yet sure why openmrs is failing to set my module’s service: Error message:
i have bean of the messageSource class.
I get org.openmrs.api.APIException: Service not found exception whenever I try Context.I get org.openmrs.api.APIException: Service not found exception whenever I try Context.getServiceContext(223).
Error Message
ERROR - Context.getServiceContext(223) | serviceContext is null. Creating new ServiceContext()
ERROR - Listener.contextDestroyed(546) | org.openmrs.api.APIException: Service not found: interface org.openmrs.messagesource.MessageSourceService
tomcat7/openmrs-runtime.properties
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2050) |2024-08-26 11:36:12,611| Unable to find a runtime properties file at /var/lib/tomcat7/openmrs-runtime.properties
INFO - Listener.contextInitialized(152) |2024-08-26 11:36:12,612| Using runtime properties file: /opt/openmrs/data/openmrs-runtime.properties
INFO - Listener.contextInitialized(155) |2024-08-26 11:36:12,620| context initialized and threadset
Aug 26, 2024 11:36:12 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Aug 26, 2024 11:36:12 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
INFO - Listener.contextDestroyed(532) |2024-08-26 11:36:12,851| contextDestroyed method :::
INFO - Context.getServiceContext(223) |2024-08-26 11:36:12,983| getServiceContext method is start here
ERROR - Context.getServiceContext(225) |2024-08-26 11:36:12,992| serviceContext is null. Creating new ServiceContext()
INFO - ServiceContext.getInstance(108) |2024-08-26 11:36:13,032| inside getInstance method :::
INFO - Context.getServiceContext(227) |2024-08-26 11:36:13,042| serviceContext ::: org.openmrs.api.context.ServiceContext@eb93ef9
INFO - ServiceContext.getInstance(108) |2024-08-26 11:36:13,042| inside getInstance method :::
ERROR - Listener.contextDestroyed(546) |2024-08-26 11:36:13,054| org.openmrs.api.APIException: Service not found: interface org.openmrs.messagesource.MessageSourceService
INFO - Context.getServiceContext(223) |2024-08-26 11:36:13,062| getServiceContext method is start here
INFO - ServiceContext.getInstance(108) |2024-08-26 11:36:13,062| inside getInstance method :::
Aug 26, 2024 11:36:13 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.
Aug 26, 2024 11:36:13 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/tomcat7/webapps/ROOT.war has finished in 93,938 ms
Aug 26, 2024 11:36:13 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Aug 26, 2024 11:36:13 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 26, 2024 11:36:13 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 95012 ms