And the output from /openmrs/ws/rest/v1/bahmnicore/config/patient Failed to load resource: the server responded with a status of 500 (Internal Server Error) is:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<org.openmrs.module.webservices.rest.SimpleObject serialization="custom">
<unserializable-parents/>
<map>
<default>
<loadFactor>0.75</loadFactor>
<threshold>12</threshold>
</default>
<int>16</int>
<int>1</int>
<string>error</string>
<linked-hash-map>
<entry>
<string>message</string>
<string>[null]</string>
</entry>
<entry>
<string>code</string>
<string>
org.bahmni.module.bahmnicore.contract.patient.data.PersonAttributeTypeData:35
</string>
</entry>
<entry>
<string>detail</string>
<string>
java.lang.NullPointerException at org.bahmni.module.bahmnicore.contract.patient.data.PersonAttributeTypeData.<init>(PersonAttributeTypeData.java:35) at org.bahmni.module.bahmnicore.contract.patient.response.PatientConfigResponse.addPersonAttribute(PatientConfigResponse.java:20) at org.bahmni.module.bahmnicore.service.impl.BahmniPatientServiceImpl.getConfig(BahmniPatientServiceImpl.java:45) at org.bahmni.module.bahmnicore.web.v1_0.controller.BahmniConfigController.getPatientConfig(BahmniConfigController.java:95) 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.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:177) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:446) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:434) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857) at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:72) at org.openmrs.web.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:64) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70) at org.openmrs.module.webservices.rest.web.filter.AuthorizationFilter.doFilter(AuthorizationFilter.java:104) at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70) at org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:82) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70) at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:54) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:108) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:534) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523) 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)
</string>
</entry>
</linked-hash-map>
</map>
<linked-hash-map>
<default>
<accessOrder>false</accessOrder>
</default>
</linked-hash-map>
</org.openmrs.module.webservices.rest.SimpleObject>
I have found the origin of the problem, it was the openmrs database DUMP that we done that caused the problem, iām searching for the RIGHT way of how to do an openmrs DUMP process. The process I followed was simple:
# DUMP openmrs
mysqldump -u [openmrs-user] -p[password] openmrs > /bahmni/db_backup.sql
# Inside my other vagrant box, I first STOPED the openmrs service
mysql -uroot -ppassword
drop database openmrs;
create database openmrs;
use openmrs;
source /bahmni/db_backup.sql
Hi @shashikanth I am trying to resolve the same issue as Cristian and the error present in clinical still persists , even though I tried the solution you proposed.
Is there another way to resolve this issue?
Yes, the problem still persist, also I want to add that when using the -uopenmrs-user there are some points where it show a message about -uopenmrs-user need to have SUPER permissions in order to continue:
ERROR 1227 (42000) at line 7061: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
So, for that I runed the command using the -uroot user and past all the queries, but the error still persist,
You are right! The ERROR message IS NOT caused by the dumping/restoring the database, the problem is caused because I added a fourth field in the Patient name Registration Form (familyName2) because by default only allow 3: givenName, middleName, familyName but in my case we need the fourth field.
So, in my process of adding a new field I probably update a few lines of code that SHOULDNāT.
If thereās some resource about adding a new field for the Patient Name?.
Because certainly it was partially successful on adding the familyName2 field because itās saving me the field in the person_name table, but I didnāt followed an specific guide for thatā¦
Itās me again, so it turn out that the Error message it wasnāt caused after I added the Second Last Name field, apparently is caused by a concept that I uploaded via CSV Import because I need the list of all the countries in the world for the Patient Registration Form
This is the FILE that caused the problem: concept_sets_countries.csv (5.0 KB). After successfully uploaded the file using CSV Import, I added a new Person Attribute Type and linked with the List of countries (The CSV File) using the Foreign Key and the org.openmrs.Concept Format. I know isnāt the right format for Concept Sets, but, It show me in my Registration Form the List of Countries, after that a few Bahmni Modules started to FAILED like Programs and Clinics with the NULL message that I posted in the picture above at the beginning of this Ticket.
But when I tried to upload it using CSV Import and selected Concept set, itās not possible because it show an ERROR, this is the File with the ERROR message which one in the last column of the file it only says nullconcept_sets_nationality_2017-10-15_23-55-22.err.csv (5.7 KB)
Whatās your use case exactly, I suspect that you want to be able to list the World countries but outside of the address, correct? So not in the country field of the address fields but somewhere else on the registration form?
Thanks for your response, actually I want to be able to add it in both sections, like a regular Dropdown as a Person Attributes Types, and also inside Address Hierarchy.
When I tried to upload the List Of Countries following this Guide, and using this format with concepts.csv (8.2 KB):
All the Names of the Countries got uploaded into my database, but when I check the LOG file for openmrs, it show me this:
And thatās the reason why a few Modules of Bahmni FAIL. So if this is the RIGHT way to Import Concepts then I donāt know what other way I could use.
It seems like the error was caused because when I uploaded the List of Countries as Concepts I only uploaded in Spanish and not in English also, but, I have to say that my friend @rafanetow help me with a custom script in order to be able to upload the List of Countries in both languages.
Thatās interesting, one would assume that it would fetch the concept names for the default locale at least (which is probably āenā btw).
Thanks for reporting back.
Hi Everyone, Iām facing the same problem.
For me thinks itās because i added some āperson attribute typesā.
I checked for openmrs logs and here is the result.
It seems like openmrs is not able to find some files now, and i donāt know why. I didnāt change any filename.
Can you help please!
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:44,954| No concept found for 'REGISTRATION_CONCEPTS'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:48,756| No concept found for 'Bahmni Diagnosis Status'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:49,076| No concept found for 'Diabetes Templates'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:50,187| No concept found for 'Order Attributes'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:50,438| No concept found for 'Vitals'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:50,448| No concept found for 'History and Examination'
ERROR - BahmniExtensions.getExtension(31) |2018-02-13 23:49:50,458| File not found /opt/openmrs/bahmni_config/openmrs/observationsAdder/CurrentMonthOfTreatment.groovy
ERROR - BahmniExtensions.getExtension(31) |2018-02-13 23:49:50,479| File not found /opt/openmrs/bahmni_config/openmrs/observationsAdder/CurrentMonthOfTreatment.groovy
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:50,501| No concept found for 'Order Attributes'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:50,510| No concept found for 'HEIGHT'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:50,513| No concept found for 'Obstetrics'
ERROR - BahmniExtensions.getExtension(31) |2018-02-13 23:49:50,523| File not found /opt/openmrs/bahmni_config/openmrs/observationsAdder/CurrentMonthOfTreatment.groovy
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:50,680| No concept found for 'Order Attributes'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:50,820| No concept found for 'Tuberculosis Followup Template'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:50,823| No concept found for 'Second Vitals'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:50,832| No concept found for 'Gynaecology'
ERROR - BahmniExtensions.getExtension(31) |2018-02-13 23:49:50,840| File not found /opt/openmrs/bahmni_config/openmrs/observationsAdder/CurrentMonthOfTreatment.groovy
ERROR - BahmniExtensions.getExtension(31) |2018-02-13 23:49:50,845| File not found /opt/openmrs/bahmni_config/openmrs/observationsAdder/CurrentMonthOfTreatment.groovy
ERROR - BahmniExtensions.getExtension(31) |2018-02-13 23:49:50,861| File not found /opt/openmrs/bahmni_config/openmrs/observationsAdder/CurrentMonthOfTreatment.groovy
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:50,891| No concept found for 'Weight'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:51,119| No concept found for 'All Observation Templates'
ERROR - BaseRestController.handleException(115) |2018-02-13 23:49:51,122| null
java.lang.NullPointerException
at org.bahmni.module.bahmnicore.web.v1_0.search.VisitFormsSearchHandler.search(VisitFormsSearchHandler.java:62)
at org.openmrs.module.webservices.rest.web.v1_0.controller.MainResourceController.get(MainResourceController.java:186)
at sun.reflect.GeneratedMethodAccessor696.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:177)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:446)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:434)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:72)
at org.openmrs.web.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:64)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70)
at org.openmrs.module.webservices.rest.web.filter.AuthorizationFilter.doFilter(AuthorizationFilter.java:104)
at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70)
at org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:82)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70)
at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:54)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:108)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:534)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
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)
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:51,215| No concept found for 'BMI Data'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:51,311| No concept found for 'Summary'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:51,319| No concept found for 'Systolic'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:51,515| No concept found for 'Bahmni Diagnosis Status'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:51,561| No concept found for 'BMI Status Data'
ERROR - BahmniExtensions.getExtension(31) |2018-02-13 23:49:51,574| File not found /opt/openmrs/bahmni_config/openmrs/observationsAdder/CurrentMonthOfTreatment.groovy
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:51,644| No concept found for 'Diastolic'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:51,738| No concept found for 'Posture'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:51,743| No concept found for 'BACTERIOLOGY CONCEPT SET'
WARN - HibernateConceptDAO.getConceptByName(1739) |2018-02-13 23:49:51,816| No concept found for 'Temperature'