Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Ticket #1350 (closed defect: fixed)

Opened 11 months ago

Last modified 11 months ago

Install Wizard Fails

Reported by: andrew Assigned to: jmiranda
Priority: blocker Milestone: OpenMRS 1.5
Component: OpenMRS Code Base Keywords:
Cc: jmiranda, bwolfe Introductory Ticket: 0
Code Review Status:

Description

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)

Attachments

openmrs1.png (39.1 kB) - added by andrew on 03/25/09 21:33:51.
This is the error the browser displays.
irc_chat_andrewaclt_03252009_1639.txt (1.9 kB) - added by jmiranda on 03/25/09 21:40:15.
1350.patch (1.4 kB) - added by andrew on 03/26/09 03:28:22.
patch that worked for me.
1350.2.patch (0.9 kB) - added by andrew on 03/26/09 03:32:29.
fixed my fat fingers, didn't know how to delete old patch

Change History

03/25/09 21:32:08 changed by jmiranda

  • cc set to jmiranda, bwolfe.

03/25/09 21:32:16 changed by jmiranda

  • priority changed from major to blocker.

03/25/09 21:33:51 changed by andrew

  • attachment openmrs1.png added.

This is the error the browser displays.

03/25/09 21:40:15 changed by jmiranda

  • attachment irc_chat_andrewaclt_03252009_1639.txt added.

03/25/09 21:42:06 changed by jmiranda

  • type changed from task to defect.

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?

03/25/09 23:09:28 changed by bwolfe

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.

03/26/09 03:28:22 changed by andrew

  • attachment 1350.patch added.

patch that worked for me.

03/26/09 03:32:29 changed by andrew

  • attachment 1350.2.patch added.

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

03/26/09 12:21:07 changed by bwolfe

  • owner changed from sunbiz to jmiranda.
  • component changed from Installer to OpenMRS Code Base.
  • milestone set to OpenMRS 1.5.

Thanks for finding this and getting the patch in Andrew.

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

03/26/09 15:44:39 changed by jmiranda

I'll get this into trunk later today.

03/27/09 01:46:50 changed by jmiranda

Testing procedure:

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

Worked for me. Thanks Andrew!

03/27/09 01:53:10 changed by jmiranda

  • status changed from new to closed.
  • resolution set to fixed.

Committed to trunk in [7178]. Will be included in release v1.5.

Andrew - Thanks for catching and fixing this one.