Repository navigation
fix(explore): make RdfSource serializable and answer a missing id plainly - #775
Merged
Merged
Conversation
…inly
The Explore page's status line, and every other panel it loads over Ajax,
kept spinning forever. Each request logged
ERROR JavaSerializer - Error serializing object class ...ExplorePage
Caused by: java.io.NotSerializableException: ...page.RdfSource
IllegalArgumentException: Argument 'data' may not be null
at SerializedPage.<init> / SerializingPageStore.addPage
so the page never reached the page store. The follow-up Ajax request then
found nothing stored and re-instantiated the page without its parameters:
WicketRuntimeException: Can't instantiate page using constructor
'public ...ExplorePage(PageParameters)' and argument ''
Caused by: NullPointerException: Cannot invoke
"String.replaceFirst(String, String)" because "tempRef" is null
which answered the Ajax channel with a 500. On nanodash.knowledgepixels.com
320 of 356 explore Ajax requests were answered that way today.
RdfSource is the record ExplorePage has kept in a field since #710, and a
page field has to be serializable, so it now is -- the nanopublications it
carries already are. An explore request without an 'id' is answered as a bad
request rather than failing as a server error, which also covers a stale link.
Both tests fail without their fix, with the two errors above.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
🎉 This PR is included in version 5.17.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The "Status:" line on
/explorenever resolved — nor did any other panel the page loads over Ajax. It was not about any particular nanopublication:get-newer-versions-of-npanswers in under 0.4 s on all healthy query instances, and the spinner kept turning for every nanopublication I tried.Each request on nanodash.knowledgepixels.com (5.17.0) logged, in this order:
so the page never reached the page store. The follow-up Ajax request found nothing stored and re-instantiated the page without its parameters:
which answered the Ajax channel with a 500 and
<redirect>./error/500</redirect>. In today's Tomcat access log, 320 of 356 explore Ajax requests were answered that way.RdfSourceis the recordExplorePagehas kept in a field since #710 (commit 6afa221), released in 5.16.0 — so the regression has been out since then.What this changes
RdfSourceimplementsSerializable. A page field has to be; the nanopublications it carries already are (NanopubImpl).idis answered as a 400 rather than failing as a server error, which also covers a stale link. This follows whatCalendarFeedPagealready does for a missingspace.Tests
RdfSourceTest#survivesPageSerializationandExplorePageTest#anExploreRequestWithoutAnIdIsRejected. Each one fails without its fix, with exactly the error from production above.🤖 Generated with Claude Code