I got it working on CloudBees now by implementing Serializable interface for 
org.openmrs.api.context.UserContext and redeploying.

FYI - this is the reply from the CloudBees support:

"Data stored in HTTP session are recommended (but not strictly required) by 
servlet specification to be serializable, so that container can save memory by 
storing inactive sessions on disk or replicate data on other nodes for 
clustering. 
Cloudbees RUN@Cloud is designed to support horizontal elasticity and make this 
a requirement. This avoid you to discover later that your application won't 
scale 
...

The standard tomcat setup don't enforce this as the session replication isn't 
enable by default, so you may not see this error running locally. In many 
cases, 
this is *only* a minor error from (lazy ?) developers who forgot making http 
session data implements java.io.Serializable, and adding this interface just 
fixes 
the issue."



On Tue, 1 May 2012 18:52:53 +0800, Mathias Lin | Meta Healthcare 
<[email protected]> wrote:

>I'm currently testing different PaaS to deploy OpenMRS in the cloud,
>mainly for demo and dev purposes, not necessarily for production.
>Today I've tried to deploy it to Jelastic, CloudFoundry and CloudBees,
>with various different results. You can follow the status in on
>Answers:
>https://answers.openmrs.org/questions/526/has-anyone-deployed-openmrs-
on-heroku?page=1#597
>
>There is one issue I am wondering about during my deployment on
>CloudBees: the setup went through without problems, but afterwards,
>when trying to access the index.htm, I am getting the following error
>(OpenMRS 1.8.3, Tomcat6, MySql5.1):
>
>java.lang.IllegalArgumentException: setAttribute: Non-serializable
>attribute __openmrs_user_context
>org.apache.catalina.session.StandardSession.setAttribute(StandardSession.jav
a:1351)
>org.apache.catalina.session.StandardSession.setAttribute(StandardSession.jav
a:1312)
>org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessi
onFacade.java:130)
>org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:89)
>org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequest
Filter.java:76)
>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilter
Internal(OpenSessionInViewFilter.java:198)
>org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequest
Filter.java:76)
>org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:83)
>org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:83)
>org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:83)
>org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(Chara
cterEncodingFilter.java:88)
>org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequest
Filter.java:76)
>
>I googled and found that this error happened to somebody before (User
>wanswins, he also tried to deploy it on CloudBees), referring to the
>IRC log
>https://wiki.openmrs.org/display/IRC/2011-07-12+-+OpenMRS
>I supposed it's still an open issue, might be CloudBees specific due
>to their individual environment or configuration. Because on a similar
>local setup, Tomcat6, JDK6, OpenMRS 1.8.3, I never had this issue
>before.
>
>Also found this general info on StackOverflow:
>http://stackoverflow.com/questions/790705/java-lang-
illegalargumentexception-setattribute-non-serializable-attribute
>
>I just wanted to place this info and also the link to Answers into the
>mailing list, in case anybody else is testing with cloud services /
>PaaS.
>
>- Mathias
>
>_________________________________________
>
>To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-implement-l" in the  
body (not the subject) of your e-mail.
>
>[mailto:[email protected]?body=SIGNOFF%20openmrs-
implement-l]

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-implement-l" in the  body 
(not the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l]

Reply via email to