Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4364 Upgrade to Hibernate 4
  3. TRUNK-4705

Add Hibernate 3 and 4 compatibility class for modules

    XMLWordPrintable

    Details

    • Complexity:
      Undetermined

      Description

      When I install Html Form Entry 2.5 and go to the Administration page, I see the following error under Html Form Entry module:

      Please fix all errors and try again. 
      javax.el.ELException: java.lang.NoSuchMethodError: org.hibernate.SessionFactory.getCurrentSession()Lorg/hibernate/classic/Session;
      org.openmrs.module.htmlformentry.db.hibernate.HibernateHtmlFormEntryDAO.needsNameAndDescriptionMigration(HibernateHtmlFormEntryDAO.java:78)
      org.openmrs.module.htmlformentry.impl.HtmlFormEntryServiceImpl.needsNameAndDescriptionMigration(HtmlFormEntryServiceImpl.java:146)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:606)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      com.sun.proxy.$Proxy172.needsNameAndDescriptionMigration(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:606)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:121)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      com.sun.proxy.$Proxy173.needsNameAndDescriptionMigration(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:606)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      com.sun.proxy.$Proxy173.needsNameAndDescriptionMigration(Unknown Source)
      org.openmrs.module.htmlformentry.extension.html.AdminList.getLinks(AdminList.java:59)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:606)
      javax.el.BeanELResolver.getValue(BeanELResolver.java:305)
      javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188)
      com.sun.el.parser.AstValue.getValue(AstValue.java:120)
      com.sun.el.parser.AstValue.getValue(AstValue.java:167)
      com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224)
      org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:1009)
      org.apache.jsp.WEB_002dINF.view.admin.index_jsp._jspx_meth_c_forEach_17(index_jsp.java:12012)
      org.apache.jsp.WEB_002dINF.view.admin.index_jsp._jspx_meth_c_catch_0(index_jsp.java:11961)
      org.apache.jsp.WEB_002dINF.view.admin.index_jsp._jspx_meth_openmrs_hasPrivilege_81(index_jsp.java:11918)
      org.apache.jsp.WEB_002dINF.view.admin.index_jsp._jspx_meth_openmrs_extensionPoint_19(index_jsp.java:11885)
      org.apache.jsp.WEB_002dINF.view.admin.index_jsp._jspService(index_jsp.java:4504)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
      org.openmrs.web.filter.JspClassLoaderFilter.doFilter(JspClassLoaderFilter.java:47)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
      org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
      org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:575)
      org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
      org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:276)
      org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:103)
      org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)
      org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
      org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
      org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
      org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
      org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
      org.openmrs.web.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:64)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
      org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:72)
      org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:54)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
      org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:108)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
      org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
      org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
      org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
      org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
      org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
      org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
      org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
      org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
      org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
      org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
      org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      org.eclipse.jetty.server.Server.handle(Server.java:370)
      org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
      org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
      org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
      org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
      org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
      org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
      org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      java.lang.Thread.run(Thread.java:744)
      

      Please create a dedicated issue in the HTML Form Entry module in JIRA when starting to work on this.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              raff Rafal Korytkowski
              Reporter:
              raff Rafal Korytkowski
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: