Reminder: Create & find trunk-related issues here. Legacy Trac tickets are still available. Problems? Workflow feedback? Need a module project? Open a support ticket.

OpenMRS Trunk

Install Wizard Fails

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: OpenMRS 1.5.0
  • Component/s: None
  • Severity:
    3
  • Keywords:
  • Description:
    Hide

    After I click "Finish" on the install wizard I get the following error:

    INFO: Successfully released change log lock
    ERROR - StandardWrapperValve.invoke(260) |2009-03-25 17:14:02,338| Servlet.service() for servlet default threw exception
    org.openmrs.api.APIException: A user context must first be passed to setUserContext()...use openSession() (and closeSession() to prevent memory leaks!) before using the API
    at org.openmrs.api.context.Context.getUserContext(Context.java:193)
    at org.openmrs.api.context.Context.removeProxyPrivilege(Context.java:577)
    at org.openmrs.api.context.Context.checkForDatabaseUpdates(Context.java:929)
    at org.openmrs.api.context.Context.startup(Context.java:670)
    at org.openmrs.web.filter.initialization.InitializationFilter.doPost(InitializationFilter.java:548)
    at org.openmrs.web.filter.initialization.InitializationFilter.doFilter(InitializationFilter.java:154)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:613)
    ERROR - HtmlIncludeTag.getInitialRequestUniqueId(122) |2009-03-25 17:14:04,140| Could not find value for INIT_REQ_UNIQUE_ID in pageContext
    ERROR - HtmlIncludeTag.getInitialRequestUniqueId(122) |2009-03-25 17:14:04,141| Could not find value for INIT_REQ_UNIQUE_ID in pageContext
    ERROR - HtmlIncludeTag.getInitialRequestUniqueId(122) |2009-03-25 17:14:04,142| Could not find value for INIT_REQ_UNIQUE_ID in pageContext
    org.openmrs.api.APIException: A user context must first be passed to setUserContext()...use openSession() (and closeSession() to prevent memory leaks!) before using the API
    at org.openmrs.api.context.Context.getUserContext(Context.java:193)
    at org.openmrs.api.context.Context.removeProxyPrivilege(Context.java:577)
    at org.openmrs.api.context.Context.checkForDatabaseUpdates(Context.java:929)
    at org.openmrs.api.context.Context.startup(Context.java:670)
    at org.openmrs.web.filter.initialization.InitializationFilter.doPost(InitializationFilter.java:548)
    at org.openmrs.web.filter.initialization.InitializationFilter.doFilter(InitializationFilter.java:154)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:613)

    Show
    After I click "Finish" on the install wizard I get the following error: INFO: Successfully released change log lock ERROR - StandardWrapperValve.invoke(260) |2009-03-25 17:14:02,338| Servlet.service() for servlet default threw exception org.openmrs.api.APIException: A user context must first be passed to setUserContext()...use openSession() (and closeSession() to prevent memory leaks!) before using the API at org.openmrs.api.context.Context.getUserContext(Context.java:193) at org.openmrs.api.context.Context.removeProxyPrivilege(Context.java:577) at org.openmrs.api.context.Context.checkForDatabaseUpdates(Context.java:929) at org.openmrs.api.context.Context.startup(Context.java:670) at org.openmrs.web.filter.initialization.InitializationFilter.doPost(InitializationFilter.java:548) at org.openmrs.web.filter.initialization.InitializationFilter.doFilter(InitializationFilter.java:154) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:613) ERROR - HtmlIncludeTag.getInitialRequestUniqueId(122) |2009-03-25 17:14:04,140| Could not find value for INIT_REQ_UNIQUE_ID in pageContext ERROR - HtmlIncludeTag.getInitialRequestUniqueId(122) |2009-03-25 17:14:04,141| Could not find value for INIT_REQ_UNIQUE_ID in pageContext ERROR - HtmlIncludeTag.getInitialRequestUniqueId(122) |2009-03-25 17:14:04,142| Could not find value for INIT_REQ_UNIQUE_ID in pageContext org.openmrs.api.APIException: A user context must first be passed to setUserContext()...use openSession() (and closeSession() to prevent memory leaks!) before using the API at org.openmrs.api.context.Context.getUserContext(Context.java:193) at org.openmrs.api.context.Context.removeProxyPrivilege(Context.java:577) at org.openmrs.api.context.Context.checkForDatabaseUpdates(Context.java:929) at org.openmrs.api.context.Context.startup(Context.java:670) at org.openmrs.web.filter.initialization.InitializationFilter.doPost(InitializationFilter.java:548) at org.openmrs.web.filter.initialization.InitializationFilter.doFilter(InitializationFilter.java:154) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:613)
  1. 1350.2.patch
    (0.9 kB)
    Burke Mamlin
    2009-03-26 03:32:29 EDT
  2. 1350.patch
    (1 kB)
    Burke Mamlin
    2009-03-26 03:28:22 EDT
  3. irc_chat_andrewaclt_03252009_1639.txt
    (2 kB)
    Burke Mamlin
    2009-03-25 21:40:15 EDT
  1. openmrs1.png
    (39 kB)

Activity

Hide
Andrew Austin added a comment - 2009-03-25 21:33:51 EDT

This is the error the browser displays.

Show
Andrew Austin added a comment - 2009-03-25 21:33:51 EDT This is the error the browser displays.
Hide
Justin Miranda added a comment - 2009-03-25 21:42:06 EDT

Ben - It looks like the initialsetup servlet needs to be configured to call openSession() and closeSession(). Do we need to do this on every request? Or just once to populate the session/threadlocal with a user context?

Show
Justin Miranda added a comment - 2009-03-25 21:42:06 EDT Ben - It looks like the initialsetup servlet needs to be configured to call openSession() and closeSession(). Do we need to do this on every request? Or just once to populate the session/threadlocal with a user context?
Hide
Ben Wolfe added a comment - 2009-03-25 23:09:28 EDT

It should be around any "unit of work" that uses the Context. I would guess it only needs to be around that final part of the setup.

Show
Ben Wolfe added a comment - 2009-03-25 23:09:28 EDT It should be around any "unit of work" that uses the Context. I would guess it only needs to be around that final part of the setup.
Hide
Andrew Austin added a comment - 2009-03-26 03:28:22 EDT

patch that worked for me.

Show
Andrew Austin added a comment - 2009-03-26 03:28:22 EDT patch that worked for me.
Hide
Andrew Austin added a comment - 2009-03-26 03:32:29 EDT

fixed my fat fingers, didn't know how to delete old patch

Show
Andrew Austin added a comment - 2009-03-26 03:32:29 EDT fixed my fat fingers, didn't know how to delete old patch
Hide
Ben Wolfe added a comment - 2009-03-26 12:21:07 EDT

Thanks for finding this and getting the patch in Andrew.

Justin, can you test this and apply this to trunk asap? Thanks!

Show
Ben Wolfe added a comment - 2009-03-26 12:21:07 EDT Thanks for finding this and getting the patch in Andrew. Justin, can you test this and apply this to trunk asap? Thanks!
Hide
Justin Miranda added a comment - 2009-03-26 15:44:39 EDT

I'll get this into trunk later today.

Show
Justin Miranda added a comment - 2009-03-26 15:44:39 EDT I'll get this into trunk later today.
Hide
Justin Miranda added a comment - 2009-03-27 01:46:50 EDT

Testing procedure:

  • Removed openmrs-runtime.properties
  • Dropped openmrs database (just to be sure)
  • Deployed latest version of trunk (with patch TRAC-1350 applied)
  • Ran through initial setup installer

Worked for me. Thanks Andrew!

Show
Justin Miranda added a comment - 2009-03-27 01:46:50 EDT Testing procedure:
  • Removed openmrs-runtime.properties
  • Dropped openmrs database (just to be sure)
  • Deployed latest version of trunk (with patch TRAC-1350 applied)
  • Ran through initial setup installer
Worked for me. Thanks Andrew!
Hide
Justin Miranda added a comment - 2009-03-27 01:53:10 EDT

Committed to trunk in rev:7178. Will be included in release v1.5.

Andrew - Thanks for catching and fixing this one.

Show
Justin Miranda added a comment - 2009-03-27 01:53:10 EDT Committed to trunk in rev:7178. Will be included in release v1.5. Andrew - Thanks for catching and fixing this one.

People

Dates

  • Created:
    2009-03-25 21:25:01 EDT
    Updated:
    2010-07-08 16:20:50 EDT
    Resolved:
    2010-07-01 22:43:30 EDT