[opencms-dev] Problem with storing session data in JDBCStore, but only on 7.0.4

Yves Glodt yg at mind.lu
Thu Jun 18 10:37:48 CEST 2009


Hallo Achim,

Thanks for the information!

Strangely, on my 7.0.5 installation, I can actually use the workplace while I 
have set <Manager distributable="true">, but it seems the session is not 
really ok, since after some time the workplace loses the information about 
which site I chose before.

So, in case I need to replicate the sessions between 2 tomcats, the best would 
be using the "in-memory"-replication as described here:
http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html ?

Best regards,
Yves


On Wednesday 17 June 2009 17:10:48 a.westermann at alkacon.com wrote:
> Hi Yves,
>
> you cannot configure tomcat to persist session data with OpenCms. Did
> you set up Tomcat with a
>
> <Context..>
>   <Manager distributable="true">?
>
> CmsWorkplaceSettings class is not Serializable and the attempt to
> setAttribute on a session with an instance of it will raise that exception:
>
> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>
>
> Kind Regards,
> Achim.
>
> -------------------
> Achim Westermann
>
> Alkacon Software GmbH  - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
>
> Visit OpenCms Days 2009 Conference and Expo
> June 15 to June 16 2009 in Cologne, Germany
> http://www.opencms-days.org
>
> Yves Glodt wrote:
> > Hi,
> >
> > I have a setup of OpenCms-7.0.5-jpa-2009-03-31 and I set it up to store
> > the session data in JDBCStore in a Firebird database. This works well.
> > The sites as well as the workplace work.
> >
> > Now I tried the same on a 7.0.4, and the sites work as well, but login to
> > the workplace fails with the exception "setAttribute: Non-serializable
> > attribute" (see the complete exception below.)
> >
> > Is there a known issue with that?
> >
> > I could not see anything related in the 7.0.5 release-notes.
> >
> > Best regards,
> > Yves
> >
> >
> >
> > 17 Jun 2009 14:44:12,848 ERROR [ina.core.ApplicationDispatcher: 704]
> > Servlet.service() for servlet jsp threw exception
> > java.lang.IllegalArgumentException: setAttribute: Non-serializable
> > attribute at
> > org.apache.catalina.session.StandardSession.setAttribute(StandardSession.
> >java:1255) at
> > org.apache.catalina.session.StandardSession.setAttribute(StandardSession.
> >java:1233) at
> > org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSe
> >ssionFacade.java:129) at
> > org.opencms.workplace.CmsWorkplace.storeSettings(CmsWorkplace.java:607)
> > at
> > org.opencms.workplace.CmsWorkplace.initWorkplaceMembers(CmsWorkplace.java
> >:1932) at org.opencms.workplace.CmsWorkplace.<init>(CmsWorkplace.java:259)
> > at org.opencms.workplace.CmsFrameset.<init>(CmsFrameset.java:112) at
> > org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.views.workplace_j
> >sp._jspService(workplace_jsp.java:46) at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > at
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav
> >a:334) at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat
> >ionFilterChain.java:252) at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte
> >rChain.java:173) at
> > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatch
> >er.java:672) at
> > org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispa
> >tcher.java:574) at
> > org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatc
> >her.java:499) at
> > org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestD
> >ispatcher.java:194) at
> > org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatche
> >r.java:169) at
> > org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:1172) at
> > org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFle
> >xRequestDispatcher.java:423) at
> > org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatche
> >r.java:173) at
> > org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:1206) at
> > org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:1150)
> > at
> > org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.jav
> >a:964) at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1494)
> > at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:152) at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat
> >ionFilterChain.java:252) at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte
> >rChain.java:173) at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve
> >.java:213) at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve
> >.java:178) at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
> >126) at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
> >105) at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j
> >ava:107) at
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:14
> >8) at
> > org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at
> > org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at
> > org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at
> > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:6
> >97) at
> > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.j
> >ava:889) at
> > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.
> >java:684) at java.lang.Thread.run(Thread.java:595)



More information about the opencms-dev mailing list