PortalCookieImpl: Necessary? Surgically removable?

8 views
Skip to first unread message

Andrew Petro

unread,
Jun 28, 2019, 5:44:00 PM6/28/19
to uPortal Community
Hi,

MyUW logs are (intermittently and currently) replete with stuff about 

ERROR [ajp-nio-8009-exec-5] o.j.p.web.ExceptionLoggingFilter 2019-06-28 16:33:49,501 - uPortal: unhandled exception 'Object of class [org.jasig.portal.portlet.dao.jpa.PortalCookieImpl] with identifier [73801878]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jasig.portal.portlet.dao.jpa.PortalCookieImpl#73801878]' for URL=/portal/p/my-hrs-portlet-roles.ctf1/max/rolesAsReport.resource.uP?pCc=cacheLevelPage, user=REDACTED , from IP=REDACTED
org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [org.jasig.portal.portlet.dao.jpa.PortalCookieImpl] with identifier [73801878]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jasig.portal.portlet.dao.jpa.PortalCookieImpl#73801878]

In the past, restarting* nodes has made this exception go away. Turn it off and turn it back on again, as it were.


Here's what I'm wondering

1. What's a PortalCookie and why do I need it? Differentially from a plain old JSESSIONID etc.?
2. How hard is it to stop needing it, and stop having it, along the lines of surgically removing an appendix.

I'll dig into this when I have time and update this thread with findings.

(MyUW is on uPortal 4.2.1.)

-Andrew

*: conceptually, restarting. Not literally restarting. MyUW uses Docker containers that are livestock not pets -- we don't patch or even restart them, we replace them.

Benito Gonzalez

unread,
Jun 28, 2019, 6:18:17 PM6/28/19
to uPortal Community
Not exactly sure, but I am always up for reducing code without removing features.

>livestock not pets -- we don't patch or even restart them, we replace them.

Ha! The major benefit to Docker.

Best,
--bjagg


From: "'Andrew Petro' via uPortal Community" <uporta...@apereo.org>
To: "uPortal Community" <uporta...@apereo.org>
Sent: Friday, June 28, 2019 2:44:00 PM
Subject: [uportal-user] PortalCookieImpl: Necessary? Surgically removable?

--
You received this message because you are subscribed to the Google Groups "uPortal Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uportal-user...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-user/781574da-0c97-49c4-90f5-04e9b0c1e731%40apereo.org.

Andrew Petro

unread,
Sep 25, 2019, 9:54:26 AM9/25/19
to uPortal Community
Trying a shallow change of

1. Un-declared and un-mapped `createPortletCookieFilter` in web.xml
2. Un-declared `createPortletCookieFilter` bean in mvcContext.xml

That filter seemed to be creating cookies whether they were needed or not. So un-declaring it should stop prospectively creating and updating those cookies. Of course, if turned out they were needed, not proactively creating them would probably break something. But: so far, in a development tier, this doesn't obviously break uPortal as MyUW uses it.

I hope to promote this change along to MyUW production and see if it

1. Makes this error stop appearing in the logs, and
2. Seems to in general improve stability.

As ever,

Andrew

Benito Gonzalez

unread,
Sep 27, 2019, 8:16:51 AM9/27/19
to Andrew Petro, uPortal Community
Hi Andrew,

Looking forward to your test results. No idea the need.

Best,
--bjagg


From: "'Andrew Petro' via uPortal Community" <uporta...@apereo.org>
To: "uPortal Community" <uporta...@apereo.org>
Sent: Wednesday, September 25, 2019 6:54:25 AM
Subject: [uportal-user] Re: PortalCookieImpl: Necessary? Surgically removable?

--
You received this message because you are subscribed to the Google Groups "uPortal Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uportal-user...@apereo.org.
Reply all
Reply to author
Forward
0 new messages