|
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400525#comment-13400525 ] Jacopo Cappellato commented on OFBIZ-4289: ------------------------------------------ In short, this fix really covers a small part of the issues you will experience if you set the "apps-distributable" to true: specifically just one you found in a very specific scenario; in general I would discourage to use the apps-distributable flag in production unless you really know what will go into the session. Based on this I don't think it is worth of adding special handling for this scenario to the framework as proposed in this ticket; by the way I will try to clean up a few objects currently set in the session, I will probably start a conversation on this in the dev list. > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400555#comment-13400555 ] Jacques Le Roux commented on OFBIZ-4289: ---------------------------------------- I agree Jacopo > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400590#comment-13400590 ] Jacques Le Roux commented on OFBIZ-4289: ---------------------------------------- One last note though: what I put in my last patch is much better than what we have in trunk currenlty. It's not complete, but it's correct at least... > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacopo Cappellato reassigned OFBIZ-4289: ---------------------------------------- Assignee: Jacopo Cappellato (was: Jacques Le Roux) > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacopo Cappellato > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacopo Cappellato reassigned OFBIZ-4289: ---------------------------------------- Assignee: Jacques Le Roux (was: Jacopo Cappellato) It should be fixed in rev. 1353681 Please resolve the issue if it works also for you. > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400797#comment-13400797 ] Jacques Le Roux commented on OFBIZ-4289: ---------------------------------------- Jacopo, I reviewed and it's ok with me, much simpler no longer need to muck around with apps-distributable in LoginWorker. Of course I briefly tested in both cases and it works. Not surprising, since we have no longer these 4 non serialised variables in session. One more thing I'd do though: replace FastMap by HashMap in UtilHttp.getParameterMap(). Because this is still used in at least LoginWorker.checkLogin() to put _PREVIOUS_PARAM_MAP_FORM_ insession, see this snippet {code} Map<String, Object> formParams = UtilHttp.getParameterMap(request, urlParams.keySet(), false); if (UtilValidate.isNotEmpty(formParams)) { session.setAttribute("_PREVIOUS_PARAM_MAP_FORM_", formParams); } {code} And morevoer it could be used in other cases by not aware developers. My patch above can be used, not sure why you did not, so I don't commit... > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400800#comment-13400800 ] Jacques Le Roux commented on OFBIZ-4289: ---------------------------------------- Before closing I'd like to backport (maybe partially) this at least in R10, 11 & 12 branches. Not sure why you did not, so I wait... > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400810#comment-13400810 ] Jacopo Cappellato commented on OFBIZ-4289: ------------------------------------------ Please feel free to back port (maybe wait a few to get some feedback from developers active in multi tenant implementation); as regards the FastMap... I am not against the switch to HashMap but I don't think it is relevant here because FastMap implements XMLSerializable that extends Serializable. > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400817#comment-13400817 ] Jacques Le Roux commented on OFBIZ-4289: ---------------------------------------- Sure I will wait maybe more, no hurry there. Ha, I did not check deeper on XMLSerializable, but then why do we get error like I posted above, ie: {quote} 2012-06-12 10:35:29,921 (OFBiz_Shutdown_Hook) [ StandardSession.java:1567:WARN ] Cannot serialize session attribute LAST_VIEW_PARAMS for session 00C48D0D76821C98403482FAE8B77C24.jvm1 java.io.NotSerializableException: net.sf.json.JSONObject at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) at javolution.util.FastMap.writeObject(FastMap.java:1513) {quote} This is resolved with HashMap, weird then isn'it? > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400479#comment-13400479 ] Jacques Le Roux edited comment on OFBIZ-4289 at 6/25/12 7:47 PM: ----------------------------------------------------------------- == TYPO == I get this also (in a customised instance but not much changed in framework) 2012-06-12 10:35:29,921 (OFBiz_Shutdown_Hook) [ StandardSession.java:1567:WARN ] Cannot serialize session attribute _LAST_VIEW_PARAMS_ for session 00C48D0D76821C98403482FAE8B77C24.jvm1 java.io.NotSerializableException: net.sf.json.JSONObject at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) at javolution.util.FastMap.writeObject(FastMap.java:1513) Do _LAST_VIEW_PARAMS_ is a FastMap<String, Object> returned by UtilHttp.getParameterMap(). I read it implements javolution.xml.XMLSerializable but not sure what this is and the Tomcat StandarManager does not seems to appreciate (StandardSession.java:1567:WARN). We can replace by an HashMap which implements Serializable {code} Index: framework/base/src/org/ofbiz/base/util/UtilHttp.java =================================================================== --- framework/base/src/org/ofbiz/base/util/UtilHttp.java (revision 1353393) +++ framework/base/src/org/ofbiz/base/util/UtilHttp.java (working copy) @@ -113,7 +113,7 @@ */ public static Map<String, Object> getParameterMap(HttpServletRequest request, Set<? extends String> nameSet, Boolean onlyIncludeOrSkip) { boolean onlyIncludeOrSkipPrim = onlyIncludeOrSkip == null ? true : onlyIncludeOrSkip.booleanValue(); - Map<String, Object> paramMap = FastMap.newInstance(); + Map<String, Object> paramMap = new HashMap<String, Object>(); // add all the actual HTTP request parameters Enumeration<String> e = UtilGenerics.cast(request.getParameterNames()); {code} I tried it seems to work fine (small test, see attached log) Note that LAST_VIEW_PARAMS was introduced previously to multitenant changes. There are maybe other such Objects put in session, but (quickly) looking around in RequestHandler found none (others are simple String). was (Author: jacques.le.roux): I get this also (in a customised instance but not much cannched for framework) 2012-06-12 10:35:29,921 (OFBiz_Shutdown_Hook) [ StandardSession.java:1567:WARN ] Cannot serialize session attribute _LAST_VIEW_PARAMS_ for session 00C48D0D76821C98403482FAE8B77C24.jvm1 java.io.NotSerializableException: net.sf.json.JSONObject at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) at javolution.util.FastMap.writeObject(FastMap.java:1513) Do _LAST_VIEW_PARAMS_ is a FastMap<String, Object> returned by UtilHttp.getParameterMap(). I read it implements javolution.xml.XMLSerializable but not sure what this is and the Tomcat StandarManager does not seems to appreciate (StandardSession.java:1567:WARN). We can replace by an HashMap which implements Serializable {code} Index: framework/base/src/org/ofbiz/base/util/UtilHttp.java =================================================================== --- framework/base/src/org/ofbiz/base/util/UtilHttp.java (revision 1353393) +++ framework/base/src/org/ofbiz/base/util/UtilHttp.java (working copy) @@ -113,7 +113,7 @@ */ public static Map<String, Object> getParameterMap(HttpServletRequest request, Set<? extends String> nameSet, Boolean onlyIncludeOrSkip) { boolean onlyIncludeOrSkipPrim = onlyIncludeOrSkip == null ? true : onlyIncludeOrSkip.booleanValue(); - Map<String, Object> paramMap = FastMap.newInstance(); + Map<String, Object> paramMap = new HashMap<String, Object>(); // add all the actual HTTP request parameters Enumeration<String> e = UtilGenerics.cast(request.getParameterNames()); {code} I tried it seems to work fine (small test, see attached log) Note that LAST_VIEW_PARAMS was introduced previously to multitenant changes. There are maybe other such Objects put in session, but (quickly) looking around in RequestHandler found none (others are simple String). > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13401187#comment-13401187 ] Jacopo Cappellato commented on OFBIZ-4289: ------------------------------------------ I suspect that it worked because of the restart and the actions you did (for example you didn't visit a screen with Ajax stuff). > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13401214#comment-13401214 ] Jacques Le Roux commented on OFBIZ-4289: ---------------------------------------- I got to the Catalog main page where Ajax is used. But actually the issue above appears when you stop the application. If distributed apps is used the Tomcat Manager will try to serialise the session. If you look at the log I posted you will see this error does not appear then. > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13404421#comment-13404421 ] Jacques Le Roux commented on OFBIZ-4289: ---------------------------------------- I fixed the FastMap issue in trunk r1355660 R12.04 r1355661 R11.04 r1355662 R10.04 r1355663 > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13404426#comment-13404426 ] Jacques Le Roux commented on OFBIZ-4289: ---------------------------------------- Note: to test the above you need to set apps-distributable to true and put some <distributable/> in the web.xml files of the applications to test BTW I found this (unrelated) error when shutting down OFBIz 2012-06-30 10:21:22,125 (0.0.0.0-startStop-1) [ WebappClassLoader.java:2269:ERROR] The web application [/ecommerce] appears to have started a thread named [ReferenceCleaner] but has failed to stop it. This is very likely to create a memory leak. > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux resolved OFBIZ-4289. ------------------------------------ Resolution: Fixed Fix Version/s: (was: Release Branch 11.04) (was: Release Branch 10.04) Release Branch 12.04 In R12.04, I backported r1353135 at r1358544 and r1353681 at r1358545 The 2 others releases branches (11 and 10) had too much conflicts, I gave up > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: SVN trunk, Release Branch 12.04 > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-4289. ---------------------------------- > Login out on a cluster handled by DeltaManager causes a NPE > ----------------------------------------------------------- > > Key: OFBIZ-4289 > URL: https://issues.apache.org/jira/browse/OFBIZ-4289 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > Environment: Ubuntu > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Critical > Labels: cluster, logout > Fix For: SVN trunk, Release Branch 12.04 > > Attachments: OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a cluster_handled_by_DeltaManager_causes_a_NPE.patch, changeset_2510.diff, ofbiz.log > > > It works locally but not on clusters. You simply get a NPE. > h3. Problem > * When we logout we cross an issue due to Tomcat sessions persistence. > * Because we set distributable to true, to allow sessions failover, > * and use and DeltaManager for replication. > * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem > h3. Tried solutions > By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB). > {code} > <Context> > <Manager className="org.apache.catalina.session.DeltatManager" pathname=""> > </Manager> > </Context> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
| Free forum by Nabble | Edit this page |
