Uploaded image for project: 'Register Module'
  1. Register Module
  2. RGS-10

Module doesn't load any more when using HTML Form Entry rev:21936

    XMLWordPrintable

    Details

    • Complexity:
      Medium

      Description

      Module doesn't load any more when using HTML Form Entry rev:21936

      
      
      Unable to refresh the WebApplicationContext
      Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0' defined in URL [jar:file:/tmp/tomcat6-tmp/1312546853424.openmrs-lib-cache/rwandaprimarycare/rwandaprimarycare.jar!/moduleApplicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'RegisterHtmlFormController' defined in URL [jar:file:/tmp/tomcat6-tmp/1312546853424.openmrs-lib-cache/register/register.jar!/moduleApplicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionForm' of bean class [org.openmrs.module.register.web.controller.RegisterHtmlFormController]: Bean property 'sessionForm' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
      java.security.AccessController.doPrivileged(Native Method)
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
      org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
      org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
      org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
      org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
      org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
       ** org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:705)
       ** org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:769)
       ** org.openmrs.module.web.WebModuleUtil.startModule(WebModuleUtil.java:314)
       ** org.openmrs.module.web.controller.ModuleListController.onSubmit(ModuleListController.java:208)
      org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
      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:807)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
      org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       ** org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)
       ** org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       ** org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       ** org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       ** org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       ** org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
      org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
      org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
      org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
      org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
      org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
      java.lang.Thread.run(Thread.java:662)
      

      Darius wrote:

      The main controller in HTML Form Entry (HtmlFormEntryController) used to extend SimpleFormController, but I refactored it to be annotation-driven.

      Looks like RegisterHtmlFormController extends that class and relies on SimpleFormController methods, but that's no longer valid.

      Refactoring the register module code so it runs against an HTML Form Entry.

        Attachments

          Activity

            People

            Assignee:
            peichenauer Peter Eichenauer
            Reporter:
            peichenauer Peter Eichenauer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: