Stream: troubleshooting

Topic: ✔ dataset status change isn't visible after publish (v5.14)


view this post on Zulip Markus Haarländer (Sep 22 2023 at 09:21):

Hi,

we are currently updating our dataverse instance from 5.13 to 5.14 and found a strange beahivour: Normally, when publishing a dataset, the dataset page refreshes every few seconds and then displays the published dataset.
With 5.14 however, the page is still refreshed, but at the end the old draft version is displayed, although the dataset is in status published. If you refresh the page manually, the correct status (published) is displayed.

Is this a known bug? It seems to be fixed with 6.0, but I couldn't find any ticket or commit regarding this issue. We would like to fix it for 5.14 until we update to 6.0 at a later stage.

Thank you (and thanks for the new Zulip chat, it's great)

view this post on Zulip Notification Bot (Sep 22 2023 at 09:53):

This topic was moved here from #dev > dataset status change isn't visible after publish (v5.14) by Oliver Bertuch.

view this post on Zulip Oliver Bertuch (Sep 22 2023 at 09:54):

@Markus Haarländer I hope you don't mind - I moved this to troubleshooting, as it seems some investigation would be necessary

view this post on Zulip Philip Durbin 🚀 (Sep 22 2023 at 11:05):

@Markus Haarländer anything in server.log? In #9015 there was a null pointer exception, for example.

view this post on Zulip Markus Haarländer (Sep 22 2023 at 12:12):

@Philip Durbin Thank you for the hint. There's indeed a null pointer exception in the log:

[2023-09-22T13:47:14.081+0200] [Payara 5.2022.5] [SCHWERWIEGEND] [] [javax.enterprise.resource.webcontainer.jsf.context] [tid: _ThreadID=98 _ThreadName=http-thread-pool::http-listener-1(2)] [timeMillis: 1695383234081] [levelValue: 1000] [[
javax.faces.view.facelets.TagAttributeException: /dataset.xhtml @93,82 test="#{not empty DatasetPage.getSignpostingLinkHeader()}" /dataset.xhtml @93,82 test="#{not empty DatasetPage.getSignpostingLinkHeader()}": java.lang.NullPointerException
at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:318)
...
Caused by: java.lang.NullPointerException
at edu.harvard.iq.dataverse.DatasetPage.getSignpostingLinkHeader(DatasetPage.java:6149)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javax.el.ELUtil.invokeMethod(ELUtil.java:236)
... 84 more
]]

The method DatasetPage.getSignPostingLinkHeader (https://github.com/IQSS/dataverse/blob/9f4ddbbbd3ea9aca23d2d828f575c7ba0747c2c7/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java#L6148) is called a lot of times during the publishing process. The last 3 times it's called, workingVersion is null. This leads to the null pointer exception.

I changed the line to

if (workingVersion == null || !workingVersion.isReleased()) {

and tried again, then the next null pointer exception is thrown:

[2023-09-22T14:02:53.418+0200] [Payara 5.2022.5] [SCHWERWIEGEND] [] [javax.enterprise.resource.webcontainer.jsf.context] [tid: _ThreadID=97 _ThreadName=http-thread-pool::http-listener-1(1)] [timeMillis: 1695384173418] [levelValue: 1000] [[
javax.faces.view.facelets.TagAttributeException: /dataset.xhtml @319,197 test="#{!((showSubmitForReviewLink or showReturnToAuthorLink or not empty DatasetPage.allowedExternalStatuses) and showPublishLink)}" /dataset.xhtml @319,197 test="#{!((showSubmitForReviewLink or showReturnToAuthorLink or not empty DatasetPage.allowedExternalStatuses) and showPublishLink)}": java.lang.NullPointerException
...
Caused by: java.lang.NullPointerException
at edu.harvard.iq.dataverse.SettingsWrapper.getAllowedExternalStatuses(SettingsWrapper.java:714)
at edu.harvard.iq.dataverse.SettingsWrapper$Proxy$_$$_WeldClientProxy.getAllowedExternalStatuses(Unknown Source)
at edu.harvard.iq.dataverse.DatasetPage.getAllowedExternalStatuses(DatasetPage.java:5885)
at jdk.internal.reflect.GeneratedMethodAccessor1482.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:299)
... 110 more
]]

Don't really get what's going on here. The actual problem seems to be that methods are called on the DatasetPage during the refresh calls, which work fine first, but for the last 3 calls or so the dataset is not properly initialized.

view this post on Zulip Philip Durbin 🚀 (Sep 22 2023 at 12:31):

Hmm, @luddaniel recently fixed a bug or two in Signposting in #9941. I wonder if he has an insight into this.

view this post on Zulip Philip Durbin 🚀 (Sep 22 2023 at 13:56):

For the other NPE dataset is null: https://github.com/IQSS/dataverse/blob/v5.14/src/main/java/edu/harvard/iq/dataverse/SettingsWrapper.java#L714

view this post on Zulip Philip Durbin 🚀 (Sep 22 2023 at 13:57):

And here's 5.14 link for the working version being null that you found: https://github.com/IQSS/dataverse/blob/v5.14/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java#L6148

view this post on Zulip Philip Durbin 🚀 (Sep 22 2023 at 13:57):

The idea behind working version is that it's a version you can edit. A draft, basically.

view this post on Zulip Philip Durbin 🚀 (Sep 22 2023 at 14:00):

Apart from that null check you just added, are there any other modifications you've made? That is, are you running a fork of 5.14 or vanilla 5.14?

view this post on Zulip Markus Haarländer (Sep 25 2023 at 10:04):

We are running a fork. But I just tried it with clean vanilla 5.14 in a docker container. Same behaviour there and same NPE in the log. So it seems to be a problem in the original dataverse source code. I made a short screencast. After the publish lock is removed, the tags "DRAFT" and "UNPUBLISHED" are still visible and the old version is displayed.
Bildschirmaufnahme-2023-09-25-um-12.00.04.mov

view this post on Zulip Philip Durbin 🚀 (Sep 25 2023 at 12:41):

This is a tough one. Almost a policy question. Once we've created the next release, 6.0 in this case, we usually don't go back and release fixes for older releases, like 5.14 in this case. That is, we don't have any plans to release 5.14.1.

I guess for now it wouldn't hurt to have an issue tracking this bug, if you're willing to create it.

view this post on Zulip Oliver Bertuch (Sep 25 2023 at 13:00):

@Markus Haarländer could you provide a reproducer with vanilla 6.0? That'd definitely help move matters along. Thanks!

view this post on Zulip Philip Durbin 🚀 (Sep 25 2023 at 13:06):

He said it seems to be fixed with 6.0 ^^

view this post on Zulip Markus Haarländer (Sep 25 2023 at 13:26):

Yes, it's fixed with 6.0
Just wanted to ask you guys if this is a known bug and if there's any known quick fix we could apply to our 5.14 fork. But as you said, it seems really tough. So we might directly update to 6.0 and skip 5.14.
Thanks for your help and quick replies!

view this post on Zulip Philip Durbin 🚀 (Sep 25 2023 at 13:56):

I'm not aware of this bug but I haven't tried to reproduce it yet.

view this post on Zulip Philip Durbin 🚀 (Sep 25 2023 at 14:42):

I just asked internally if anyone has seen this: https://iqss.slack.com/archives/CVB2SMDFX/p1695652927563959

view this post on Zulip Philip Durbin 🚀 (Sep 25 2023 at 14:59):

A related issue, if not the same: Dataset page stays on the url with "version=DRAFT" after the dataset is published #8548

view this post on Zulip Philip Durbin 🚀 (Sep 25 2023 at 15:13):

But in that issue a manual refresh doesn't fix it because version=DRAFT is in the URL. So I guess it's a little different. @Markus Haarländer if you'd like to create an issue for your scenario please go ahead. You even have that nice video to upload. :grinning:

view this post on Zulip Markus Haarländer (Sep 25 2023 at 15:38):

Thanks Phil, I created an issue: https://github.com/IQSS/dataverse/issues/9954
However, I confused something in my first post. You're right, after a manual refresh, it's still not displaying correct. The message *Info – The "DRAFT" version was not found. This is version "1.0". * is displayed and version=DRAFT is in the URL. Don't know, maybe I tried it with an already published item before, and then the behaviour is different. Will have to test again. But anyway, still an undesired behaviour :)

view this post on Zulip Philip Durbin 🚀 (Sep 25 2023 at 15:42):

Thanks!

view this post on Zulip Markus Haarländer (Sep 27 2023 at 07:27):

Jim made a suggestion for a fix (https://github.com/IQSS/dataverse/issues/9954#issuecomment-1736297314) and it works great.
Thanks for all your help, will mark this topic as resolved now.

view this post on Zulip Notification Bot (Sep 27 2023 at 07:27):

Markus Haarländer has marked this topic as resolved.


Last updated: Oct 30 2025 at 06:21 UTC