-
Notifications
You must be signed in to change notification settings - Fork 530
Description
What steps does it take to reproduce the issue?
We get an internal server error with API request as documented with null for the theme in the following json:
{
"id" : 0,
"ownerId" : 0,
"name" : "A Test Dataverse",
"alias" : "test2",
"permissionRoot" : false,
"affiliation" : null,
"description" : "This is a longer description than 'name' and 'alias'",
"dataverseType" : "JOURNALS",
"storageDriverLabel" : null,
"creationDate" : null,
"theme" : {
"id" : 0,
"logo" : null,
"logoBackgroundColor" : null,
"tagline" : null,
"linkColor" : null,
"textColor" : null,
"linkUrl" : null,
"backgroundColor" : null
},
"dataverseContacts" : [ {
"displayOrder" : 0,
"contactEmail" : "dummy@email.com"
}, {
"displayOrder" : 1,
"contactEmail" : "dummier@email.com"
} ],
"filePIDsEnabled" : false,
"isReleased" : false
}
-
When does this issue occur?
-
Which page(s) does it occurs on?
-
What happens?
The server logs
[#|2025-11-18T12:19:08.810+0100|SEVERE|Payara 6.2025.3|edu.harvard.iq.dataverse.api.errorhandlers.ThrowableHandler|_ThreadID=74;_ThreadName=http-thread-pool::http-listener-1(1);_TimeMillis=1763464748810;_LevelValue=1000;|
java.lang.ClassCastException: class jakarta.json.JsonValueImpl cannot be cast to class jakarta.json.JsonObject (jakarta.json.JsonValueImpl and jakarta.json.JsonObject are in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @42d181cd)
at org.eclipse.parsson.JsonObjectBuilderImpl$JsonObjectImpl.getJsonObject(JsonObjectBuilderImpl.java:234)
at edu.harvard.iq.dataverse.util.json.JsonParser.parseDataverse(JsonParser.java:155)
at edu.harvard.iq.dataverse.api.Dataverses.parseAndValidateAddDataverseRequestBody(Dataverses.java:173)
at edu.harvard.iq.dataverse.api.Dataverses.addDataverse(Dataverses.java:139)
-
To whom does it occur (all users, curators, superusers)?
-
What did you expect to happen?
get 400 Bad request, not 500 internal server error, or a missing theme should be ignored
Which version of Dataverse are you using?
A DANS variant of v6.7.1
Any related open or closed issues to this bug report?
Screenshots:
No matter the issue, screenshots are always welcome.
To add a screenshot, please use one of the following formats and/or methods described here:
Are you thinking about creating a pull request for this issue?
Help is always welcome, is this bug something you or your organization plan to fix?