Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-697

Cannot create Concept Question with Drug answer

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: OpenMRS 1.5.0
    • Component/s: None
    • Labels:

      Description

      If you create a new Concept with Class=Question and Datatype=Coded, you cannot add Drugs as answers to the question. Attempted on Demo resulting in org.springframework.dao.DataIntegrityViolationException Attached is an image of the concept created and the stacktrace after clicking "Save Concept".

      An Internal Error has Occurred
      org.springframework.dao.DataIntegrityViolationException
      
      Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
      
      
      
      Consult the help document.
      Contact your friendly neighborhood administrator if it cannot be resolved.
      
      Hide stack trace
      org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:622)
      org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:728)
      org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:604)
      org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:709)
      org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:678)
      org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:319)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      $Proxy61.saveConcept(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      java.lang.reflect.Method.invoke(Unknown Source)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
      $Proxy108.saveConcept(Unknown Source)
      org.openmrs.web.controller.ConceptFormController.onSubmit(ConceptFormController.java:175)
      org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
      org.openmrs.web.controller.ConceptFormController.processFormSubmission(ConceptFormController.java:124)
      org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265)
      org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
      org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
      org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      org.openmrs.web.OpenmrsFilter.doFilter(OpenmrsFilter.java:123)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
      org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
      org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
      org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
      org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
      org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      java.lang.Thread.run(Unknown Source)
      
      
      OpenMRS Version: 1.4.3.00 Build 8446
      Database Version: 1.4.0.23
      
      

        Attachments

          Activity

            People

            • Assignee:
              bwolfe Ben Wolfe
              Reporter:
              bmckown Brian McKown
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: