From f2ef1f996f329894ca3ffcccb4b6d66c0eee1267 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Sun, 28 Jun 2026 16:21:11 -0400 Subject: [PATCH 01/16] library update config changes some for Win11 --- conf/jhove/jhove.conf | 3 +- pom.xml | 31 ++++++++++--------- .../iq/dataverse/util/xml/XmlPrinter.java | 2 +- .../iq/dataverse/sitemap/SiteMapUtilTest.java | 2 +- .../iq/dataverse/util/JhoveFileTypeTest.java | 27 +++++++++------- 5 files changed, 35 insertions(+), 30 deletions(-) diff --git a/conf/jhove/jhove.conf b/conf/jhove/jhove.conf index 11fbb7bf737..f0d0f80d7cd 100644 --- a/conf/jhove/jhove.conf +++ b/conf/jhove/jhove.conf @@ -47,8 +47,7 @@ edu.harvard.hul.ois.jhove.module.WarcModule - - com.mcgath.jhove.module.PngModule + edu.harvard.hul.ois.jhove.module.PngModule diff --git a/pom.xml b/pom.xml index dd4d92c4f0d..1ff887b4746 100644 --- a/pom.xml +++ b/pom.xml @@ -30,13 +30,13 @@ war - 1.2.18.4 - 10.19.0 + 1.2.26 + 12.9.0 1.1.1 - 1.20.1 - 5.4.0 - 3.2.2 - 5.9.1 + 1.34.0 + 5.5.1 + 3.3.1 + 5.10.0 Dataverse API ${project.version} @@ -108,7 +108,7 @@ org.apache.james apache-mime4j-dom - 0.8.7 + 0.8.14 xerces @@ -153,7 +153,7 @@ org.apache.httpcomponents.client5 httpclient5 - 5.2.1 + 5.6.1 @@ -215,7 +215,7 @@ com.apicatalog titanium-json-ld - 1.4.0 + 1.7.0 com.google.code.gson @@ -404,7 +404,7 @@ commons-validator commons-validator - 1.7 + 1.10.1 @@ -463,6 +463,9 @@ ${poi.version} + org.openpreservation.jhove jhove-core ${jhove.version} @@ -496,7 +499,7 @@ edu.ucsb.nceas ezid - 1.0.0 + 1.0.3 jar @@ -524,7 +527,7 @@ org.javaswift joss - 0.10.0 + 0.10.4 org.apache.commons @@ -541,7 +544,7 @@ com.nimbusds oauth2-oidc-sdk - 11.22.1 + 11.30.1 @@ -1104,7 +1107,7 @@ maven-checkstyle-plugin checkstyle.xml - UTF-8 + UTF-8 true diff --git a/src/main/java/edu/harvard/iq/dataverse/util/xml/XmlPrinter.java b/src/main/java/edu/harvard/iq/dataverse/util/xml/XmlPrinter.java index f253be1437a..d42221ff002 100644 --- a/src/main/java/edu/harvard/iq/dataverse/util/xml/XmlPrinter.java +++ b/src/main/java/edu/harvard/iq/dataverse/util/xml/XmlPrinter.java @@ -18,7 +18,7 @@ public class XmlPrinter { static public String prettyPrintXml(String xml) { try { - TransformerFactory tf = TransformerFactory.newInstance(); + TransformerFactory tf = TransformerFactory.newDefaultInstance(); // Set secure processing feature tf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); diff --git a/src/test/java/edu/harvard/iq/dataverse/sitemap/SiteMapUtilTest.java b/src/test/java/edu/harvard/iq/dataverse/sitemap/SiteMapUtilTest.java index 75f859f0fb6..6eb1926fda9 100644 --- a/src/test/java/edu/harvard/iq/dataverse/sitemap/SiteMapUtilTest.java +++ b/src/test/java/edu/harvard/iq/dataverse/sitemap/SiteMapUtilTest.java @@ -173,7 +173,7 @@ void testHugeSiteMap() throws IOException, ParseException, SAXException { String sitemapString = XmlPrinter.prettyPrintXml(new String(Files.readAllBytes(Paths.get(sitemapFile.getAbsolutePath())), StandardCharsets.UTF_8)); // System.out.println("sitemap: " + sitemapString); - String[] lines = sitemapString.split("\n"); + String[] lines = sitemapString.split("\r?\n"); for (int i = 0; i < lines.length; i++) { String line = lines[i].strip(); if (StringUtils.isNotBlank(line)) { diff --git a/src/test/java/edu/harvard/iq/dataverse/util/JhoveFileTypeTest.java b/src/test/java/edu/harvard/iq/dataverse/util/JhoveFileTypeTest.java index 879c4bc1c4e..9f3d09c4345 100644 --- a/src/test/java/edu/harvard/iq/dataverse/util/JhoveFileTypeTest.java +++ b/src/test/java/edu/harvard/iq/dataverse/util/JhoveFileTypeTest.java @@ -2,6 +2,8 @@ import java.io.File; import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.commons.io.FileUtils; @@ -13,7 +15,7 @@ public class JhoveFileTypeTest { static JhoveFileType jhoveFileType; - static String baseDirForConfigFiles = "/tmp"; + static Path baseDirForConfigFiles; static File png; static File gif; static File jpg; @@ -25,11 +27,18 @@ public class JhoveFileTypeTest { static File ipynb; @BeforeAll - public static void setUpClass() { - System.setProperty("com.sun.aas.instanceRoot", baseDirForConfigFiles); - jhoveFileType = new JhoveFileType(); - copyConfigIntoPlace(); + public static void setUpClass() throws IOException { + baseDirForConfigFiles = Files.createTempDirectory("dataverse-test-"); + System.setProperty("com.sun.aas.instanceRoot", baseDirForConfigFiles.toString()); + + Path configDir = baseDirForConfigFiles.resolve("config"); + Files.createDirectories(configDir); + Files.copy( + Path.of("conf", "jhove", "jhove.conf"), + configDir.resolve("jhove.conf") + ); + jhoveFileType = new JhoveFileType(); png = new File("src/test/resources/images/coffeeshop.png"); gif = new File("src/main/webapp/resources/images/ajax-loading.gif"); jpg = new File("src/main/webapp/resources/images/dataverseproject_logo.jpg"); @@ -78,13 +87,7 @@ public void testGetJhoveConfigFile() { } private static void copyConfigIntoPlace() { - String testFile1Src = "conf/jhove/jhove.conf"; - String testFile1Tmp = baseDirForConfigFiles + "/config/jhove.conf"; - try { - FileUtils.copyFile(new File(testFile1Src), new File(testFile1Tmp)); - } catch (IOException ex) { - Logger.getLogger(JhoveFileTypeTest.class.getName()).log(Level.SEVERE, null, ex); - } + // Not needed anymore due to new setup } } From e8c1c4c6f95de7908b72d969e2c6a2f3738467a7 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Tue, 30 Jun 2026 16:26:35 -0400 Subject: [PATCH 02/16] avoid line sep hardcoding --- .../harvard/iq/dataverse/util/xml/XmlPrinterTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/java/edu/harvard/iq/dataverse/util/xml/XmlPrinterTest.java b/src/test/java/edu/harvard/iq/dataverse/util/xml/XmlPrinterTest.java index 1a190389ed5..5b4f9bffbbb 100644 --- a/src/test/java/edu/harvard/iq/dataverse/util/xml/XmlPrinterTest.java +++ b/src/test/java/edu/harvard/iq/dataverse/util/xml/XmlPrinterTest.java @@ -7,11 +7,12 @@ public class XmlPrinterTest { @Test public void testPrettyPrintXmlShort() { + String lineSep = System.lineSeparator(); String xml = "baz"; - String expResult = "\n" - + "\n" - + " baz\n" - + "\n"; + String expResult = "" + lineSep + + "" + lineSep + + " baz" + lineSep + + "" + lineSep; String result = XmlPrinter.prettyPrintXml(xml); assertEquals(expResult, result); } From e0040ab6a3930a9aa324f830fd4ba539f4738313 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Mon, 29 Jun 2026 09:18:21 -0400 Subject: [PATCH 03/16] payara update, jhove downgrade, DDI fix --- modules/dataverse-parent/pom.xml | 13 +++++++------ pom.xml | 2 +- .../iq/dataverse/export/ddi/DdiExportUtil.java | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/dataverse-parent/pom.xml b/modules/dataverse-parent/pom.xml index 15763697c41..0b7494a94bb 100644 --- a/modules/dataverse-parent/pom.xml +++ b/modules/dataverse-parent/pom.xml @@ -1,3 +1,4 @@ + 4.0.0 @@ -132,7 +133,7 @@ - 6.10.1 + 6.11 21 UTF-8 @@ -149,12 +150,12 @@ -Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region} - 7.2026.2 + 7.2026.6 42.7.11 - 9.8.0 + 9.10.0 16 - 2.33.0 - 26.30.0 + 2.46.17 + 26.69.0 1.7.35 @@ -418,7 +419,7 @@ unidata-all Unidata All - https://artifacts.unidata.ucar.edu/repository/unidata-all/ + https://artifacts.unidata.ucar.edu/repository/unidata-all false diff --git a/pom.xml b/pom.xml index 1ff887b4746..e68a1314322 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ 1.2.26 12.9.0 1.1.1 - 1.34.0 + 1.20.1 5.5.1 3.3.1 5.10.0 diff --git a/src/main/java/edu/harvard/iq/dataverse/export/ddi/DdiExportUtil.java b/src/main/java/edu/harvard/iq/dataverse/export/ddi/DdiExportUtil.java index f5cc86bf8ee..1e846e09a6b 100644 --- a/src/main/java/edu/harvard/iq/dataverse/export/ddi/DdiExportUtil.java +++ b/src/main/java/edu/harvard/iq/dataverse/export/ddi/DdiExportUtil.java @@ -2021,7 +2021,7 @@ public static void datasetHtmlDDI(InputStream datafile, OutputStream outputStrea Document document = builder.parse(datafile); // Use a Transformer for output - TransformerFactory tFactory = TransformerFactory.newInstance(); + TransformerFactory tFactory = TransformerFactory.newDefaultInstance(); // Set secure processing feature tFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); tFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); From fcf6563badeef8cb0d28433ae5662c9a68dbf888 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Mon, 29 Jun 2026 10:47:53 -0400 Subject: [PATCH 04/16] restore old jhove config --- conf/jhove/jhove.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/jhove/jhove.conf b/conf/jhove/jhove.conf index f0d0f80d7cd..11fbb7bf737 100644 --- a/conf/jhove/jhove.conf +++ b/conf/jhove/jhove.conf @@ -47,7 +47,8 @@ edu.harvard.hul.ois.jhove.module.WarcModule + - edu.harvard.hul.ois.jhove.module.PngModule + com.mcgath.jhove.module.PngModule From 6f8eafd91aa69df93d0e46b86057c994017c00ce Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Tue, 30 Jun 2026 17:14:06 -0400 Subject: [PATCH 05/16] payara version update in docs --- doc/sphinx-guides/source/installation/prerequisites.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/sphinx-guides/source/installation/prerequisites.rst b/doc/sphinx-guides/source/installation/prerequisites.rst index 2ad06b5ea39..2e28f12dbfb 100644 --- a/doc/sphinx-guides/source/installation/prerequisites.rst +++ b/doc/sphinx-guides/source/installation/prerequisites.rst @@ -44,7 +44,7 @@ On RHEL/derivative you can make Java 21 the default with the ``alternatives`` co Payara ------ -Payara 7.2026.2 is recommended. Newer versions might work fine. Regular updates are recommended. +Payara 7.2026.6 is recommended. Newer versions might work fine. Regular updates are recommended. Installing Payara ================= @@ -55,8 +55,8 @@ Installing Payara - Download and install Payara (installed in ``/usr/local/payara7`` in the example commands below):: - # wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/7.2026.2/payara-7.2026.2.zip - # unzip payara-7.2026.2.zip + # wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/7.2026.6/payara-7.2026.6.zip + # unzip payara-7.2026.6.zip # mv payara7 /usr/local If nexus.payara.fish is ever down for maintenance, Payara distributions are also available from https://repo1.maven.org/maven2/fish/payara/distributions/payara/ From 075086a96677fdf720034b0e17cdbe07eaf8c7d1 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Wed, 15 Jul 2026 14:44:09 -0400 Subject: [PATCH 06/16] update test and note ~incompatibility, update todo --- doc/sphinx-guides/source/api/changelog.rst | 2 ++ .../edu/harvard/iq/dataverse/api/DownloadInstanceWriter.java | 2 +- .../java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/sphinx-guides/source/api/changelog.rst b/doc/sphinx-guides/source/api/changelog.rst index 10e368da51f..7e3cdf6f303 100644 --- a/doc/sphinx-guides/source/api/changelog.rst +++ b/doc/sphinx-guides/source/api/changelog.rst @@ -15,6 +15,8 @@ v6.12 - **/api/admin/index/perms/{id}** +- Whether file extensions are included in the "Content-disposition" header returned when downloading auxiliary files depends on whether the relevant format is one of the Mimetypes supported in Tika. A recent update to the version of Tika has added new mimetypes, including "text/markdown", and auxiliary files with these types now have a a file extension included (e.g. ".md" in this case) in the header. + v6.11 ----- - The GET /api/mydata/retrieve, if the search returns no data, now includes the "data" block with 0 results. The message that was returned in "error_message" will be returned in "message" and the "success" will be `true`. All other errors will continue to reply with "success":false and the error message in "error_message". diff --git a/src/main/java/edu/harvard/iq/dataverse/api/DownloadInstanceWriter.java b/src/main/java/edu/harvard/iq/dataverse/api/DownloadInstanceWriter.java index c815caa09eb..9b11aae02e6 100644 --- a/src/main/java/edu/harvard/iq/dataverse/api/DownloadInstanceWriter.java +++ b/src/main/java/edu/harvard/iq/dataverse/api/DownloadInstanceWriter.java @@ -642,7 +642,7 @@ private boolean isAuxiliaryObjectCached(StorageIO storageIO, String auxiliaryTag } } - // TODO: Return ".md" for "text/markdown" as well as other extensions in MimeTypeDetectionByFileExtension.properties + // TODO: Return file extensions for extensions in MimeTypeDetectionByFileExtension.properties and not supported by Tika private String getFileExtension(AuxiliaryFile auxFile) { String fileExtension = ""; if (auxFile == null) { diff --git a/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java index 754350e93db..b5c0c97de93 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java @@ -260,7 +260,7 @@ public void testUploadAuxFiles() throws IOException { downloadAuxFileMd.then().assertThat().statusCode(OK.getStatusCode()); // No file extenstion here because Tika's getDefaultMimeTypes doesn't include "text/markdown". // Note: browsers seem to add ".bin" ("myfile.bin") rather than no extension ("myfile"). - assertEquals("attachment; filename=\"data.tab.README_0.1\"", downloadAuxFileMd.header("Content-disposition")); + assertEquals("attachment; filename=\"data.tab.README_0.1.md\"", downloadAuxFileMd.header("Content-disposition")); // Download Markdown aux file with no MIME type given Response downloadAuxFileNoMime1 = UtilIT.downloadAuxFile(fileId, formatTagNoMimeType1, formatVersionNoMimeType1, apiToken); From 7cf0dc89e53d50ba8e574284112f4954d38a6105 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Wed, 12 Aug 2026 13:36:13 -0400 Subject: [PATCH 07/16] payara 7.2026.7 updates (cherry picked from commit 2e69a618001dc08f22b68e7cbabc67fec3e04c1f) --- modules/dataverse-parent/pom.xml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/modules/dataverse-parent/pom.xml b/modules/dataverse-parent/pom.xml index 0b7494a94bb..9d63c0ecc31 100644 --- a/modules/dataverse-parent/pom.xml +++ b/modules/dataverse-parent/pom.xml @@ -150,8 +150,8 @@ -Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region} - 7.2026.6 - 42.7.11 + 7.2026.7 + 42.7.12 9.10.0 16 2.46.17 @@ -174,8 +174,7 @@ 3.7.1 5.10.2 5.11.0 - 0.8.11 - + 9.3 @@ -199,9 +198,18 @@ 3.2.2 1.6.13 1.7.0 + 5.7.0.6970 + 0.8.14 0.48.0 + + + https://sonarcloud.io + iqss + IQSS_dataverse + ${project.groupId}:${project.artifactId} + jacoco @@ -319,6 +327,11 @@ pomchecker-maven-plugin ${pomchecker-maven-plugin.version} + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar.version} + org.sonatype.plugins nexus-staging-maven-plugin From c77e4929907218f54e0dee2e724835729a533691 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Wed, 12 Aug 2026 14:54:14 -0400 Subject: [PATCH 08/16] payara 7.2026.7 doc updates/release note --- doc/release-notes/12493-payara7-2026.7plus.md | 19 +++++++++++++++++++ .../source/installation/prerequisites.rst | 6 +++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 doc/release-notes/12493-payara7-2026.7plus.md diff --git a/doc/release-notes/12493-payara7-2026.7plus.md b/doc/release-notes/12493-payara7-2026.7plus.md new file mode 100644 index 00000000000..e91052fb81b --- /dev/null +++ b/doc/release-notes/12493-payara7-2026.7plus.md @@ -0,0 +1,19 @@ +This release updates to the recommended Payara-7.2026.7 release and updates many of the third-party libraries Dataverse uses. + +Upgrade instructions: + +~ Standard payara upgrade steps w.r.t. download, unzip, etc. + +W.r.t. what has changed: +domain.xml needs the following line added: +--add-opens=java.base/java.lang.reflect=ALL-UNNAMED + +The file glassfish-acc.xml is replaced with the new payara-acc.xml + +default-logging.properties has been updated. + +I'm not sure that either of these file changes are necessary, but I assume glassfish-acc.xml will stop being supported at some point, so I'd recommend adding a step to copy those files. + + + + diff --git a/doc/sphinx-guides/source/installation/prerequisites.rst b/doc/sphinx-guides/source/installation/prerequisites.rst index 2e28f12dbfb..db808519cca 100644 --- a/doc/sphinx-guides/source/installation/prerequisites.rst +++ b/doc/sphinx-guides/source/installation/prerequisites.rst @@ -44,7 +44,7 @@ On RHEL/derivative you can make Java 21 the default with the ``alternatives`` co Payara ------ -Payara 7.2026.6 is recommended. Newer versions might work fine. Regular updates are recommended. +Payara 7.2026.7 is recommended. Newer versions might work fine. Regular updates are recommended. Installing Payara ================= @@ -55,8 +55,8 @@ Installing Payara - Download and install Payara (installed in ``/usr/local/payara7`` in the example commands below):: - # wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/7.2026.6/payara-7.2026.6.zip - # unzip payara-7.2026.6.zip + # wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/7.2026.7/payara-7.2026.7.zip + # unzip payara-7.2026.7.zip # mv payara7 /usr/local If nexus.payara.fish is ever down for maintenance, Payara distributions are also available from https://repo1.maven.org/maven2/fish/payara/distributions/payara/ From 36d004eb6c88901cd26b57ec6db2f05522701226 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Wed, 12 Aug 2026 15:33:24 -0400 Subject: [PATCH 09/16] aws bom update --- modules/dataverse-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dataverse-parent/pom.xml b/modules/dataverse-parent/pom.xml index 22ef30191ac..54daeddba8d 100644 --- a/modules/dataverse-parent/pom.xml +++ b/modules/dataverse-parent/pom.xml @@ -154,7 +154,7 @@ 42.7.12 9.8.0 16 - 2.46.17 + 2.51.3 26.69.0 From 14030bba88d9e94b9473d15cbd5cec99b8190a70 Mon Sep 17 00:00:00 2001 From: qqmyers Date: Wed, 19 Aug 2026 16:14:33 -0400 Subject: [PATCH 10/16] fix casts of db results where type has changed --- .../java/edu/harvard/iq/dataverse/DataFileServiceBean.java | 2 +- .../harvard/iq/dataverse/GuestbookResponseServiceBean.java | 2 +- .../java/edu/harvard/iq/dataverse/UserServiceBean.java | 6 +++--- .../java/edu/harvard/iq/dataverse/mydata/MyDataFinder.java | 7 ++----- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/DataFileServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/DataFileServiceBean.java index 7af16372f40..4dac952b42c 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DataFileServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/DataFileServiceBean.java @@ -505,7 +505,7 @@ public DataFile findCheapAndEasy(Long id) { return null; } - Integer file_id = (Integer) result[0]; + Integer file_id = ((Number) result[0]).intValue(); dataFile = new DataFile(); dataFile.setMergeable(false); diff --git a/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java index 740543067bd..a92f97e53cd 100644 --- a/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java @@ -396,7 +396,7 @@ private Map selectCustomQuestionAnswers(Long dataverseId, Long if (customResponses != null) { for (Object[] response : customResponses) { - Integer responseId = (Integer) response[2]; + Integer responseId = ((Number) response[2]).intValue(); if (asString) { // as combined strings of comma-separated question and answer values diff --git a/src/main/java/edu/harvard/iq/dataverse/UserServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/UserServiceBean.java index d63fcfa3e34..6c520b71f4e 100644 --- a/src/main/java/edu/harvard/iq/dataverse/UserServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/UserServiceBean.java @@ -125,7 +125,7 @@ public List getAuthenticatedUserList(String searchTerm, private AuthenticatedUser createAuthenticatedUserForView (Object[] dbRowValues, String roles, int rowNum){ AuthenticatedUser user = new AuthenticatedUser(); - user.setId(new Long((int)dbRowValues[0])); + user.setId(((Number)dbRowValues[0]).longValue()); user.setUserIdentifier((String)dbRowValues[1]); user.setLastName(UserUtil.getStringOrNull(dbRowValues[2])); user.setFirstName(UserUtil.getStringOrNull(dbRowValues[3])); @@ -157,7 +157,7 @@ private AuthenticatedUser createAuthenticatedUserForView (Object[] dbRowValues, * Attempt to retrieve all the user roles in 1 query * Consider putting limits on this -- e.g. no more than 1,000 user identifiers or something similar * - * @param userIdentifierList + * @param userObjectList * @return */ private HashMap> retrieveRolesForUsers(List userObjectList){ @@ -170,7 +170,7 @@ private HashMap> retrieveRolesForUsers(List userO ; List databaseIds = userObjectList.stream() - .map(userInfo -> (Integer)userInfo[0]) + .map(userInfo -> ((Number)userInfo[0]).intValue()) .collect(Collectors.toList()); if ((userIdentifierList==null)||(userIdentifierList.isEmpty())){ diff --git a/src/main/java/edu/harvard/iq/dataverse/mydata/MyDataFinder.java b/src/main/java/edu/harvard/iq/dataverse/mydata/MyDataFinder.java index d38e520de0b..2072f117b72 100644 --- a/src/main/java/edu/harvard/iq/dataverse/mydata/MyDataFinder.java +++ b/src/main/java/edu/harvard/iq/dataverse/mydata/MyDataFinder.java @@ -22,7 +22,6 @@ import java.util.logging.Logger; import edu.harvard.iq.dataverse.util.json.JsonUtil; -import jakarta.json.Json; import jakarta.json.JsonArrayBuilder; import jakarta.json.JsonObjectBuilder; import org.apache.commons.lang3.StringUtils; @@ -518,8 +517,7 @@ private boolean runStep2DirectAssignments(){ // Iterate through assigned objects // ----------------------------------------------- for (Object[] ra : results) { - dvIdAsInteger = (Integer)ra[0]; // ?? Why? - dvId = new Long(dvIdAsInteger); + dvId = ((Number)ra[0]).longValue(); dtype = (String)ra[1]; parentId = (Long)ra[2]; @@ -596,8 +594,7 @@ private boolean runStep3FilePermsAssignedAtDataverse(){ // Iterate through object list // for (Object[] ra : results) { - dvIdAsInteger = (Integer)ra[0]; // ?? Why? - dvId = new Long(dvIdAsInteger); + dvId = ((Number)ra[0]).longValue(); dtype = (String)ra[1]; parentId = (Long)ra[2]; From 1e739afb405b0c5db976eda299f350a5282e8be8 Mon Sep 17 00:00:00 2001 From: qqmyers Date: Wed, 19 Aug 2026 17:21:19 -0400 Subject: [PATCH 11/16] fix another cast to int --- .../edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java index a92f97e53cd..98e0b0fc844 100644 --- a/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java @@ -967,7 +967,7 @@ public Map mapDatasetTitles(Long dataverseId) { if (titleResults != null) { for (Object[] titleObj : titleResults) { - Integer datasetId = (Integer) titleObj[1]; + Integer datasetId = ((Number) titleObj[1]).intValue(); String datasetTitle = (String) titleObj[0]; ret.put(datasetId, datasetTitle); From 8cf85874c03fd086ae80d6a7a6543bc8e7d93fa8 Mon Sep 17 00:00:00 2001 From: qqmyers Date: Wed, 19 Aug 2026 17:21:45 -0400 Subject: [PATCH 12/16] changes per review request --- doc/release-notes/12493-payara7-2026.7plus.md | 73 +++++++++++++++++-- doc/sphinx-guides/source/api/changelog.rst | 2 +- .../iq/dataverse/util/JhoveFileTypeTest.java | 4 - 3 files changed, 66 insertions(+), 13 deletions(-) diff --git a/doc/release-notes/12493-payara7-2026.7plus.md b/doc/release-notes/12493-payara7-2026.7plus.md index e91052fb81b..5b03708313c 100644 --- a/doc/release-notes/12493-payara7-2026.7plus.md +++ b/doc/release-notes/12493-payara7-2026.7plus.md @@ -1,18 +1,75 @@ This release updates to the recommended Payara-7.2026.7 release and updates many of the third-party libraries Dataverse uses. -Upgrade instructions: +### Upgrade from Payara 7.2026.2 to Payara 7.2026.7 -~ Standard payara upgrade steps w.r.t. download, unzip, etc. +The instructions below describe the upgrade procedure based on moving your existing Payara 7.2026.2 domain directory into the new Payara 7.2026.7 distribution. We recommend this method because it is the easiest way to recreate your current configuration and preserve your data. -W.r.t. what has changed: -domain.xml needs the following line added: ---add-opens=java.base/java.lang.reflect=ALL-UNNAMED +1. Stop Payara: -The file glassfish-acc.xml is replaced with the new payara-acc.xml + ```shell + sudo service payara stop + ``` -default-logging.properties has been updated. +2. Move the current Payara 7.2026.2 directory out of the way: -I'm not sure that either of these file changes are necessary, but I assume glassfish-acc.xml will stop being supported at some point, so I'd recommend adding a step to copy those files. + ```shell + mv /usr/local/payara7 /usr/local/payara7-2026.2 + ``` + +3. Download the new Payara version 7.2026.7, and unzip it in its place: + + ```shell + cd /usr/local + curl -L -O https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/7.2026.7/payara-7.2026.7.zip + unzip payara-7.2026.7.zip + mv payara-7.2026.7 payara7 + ``` + +4. Replace the brand new `payara7/glassfish/domains/domain1` with your old, preserved domain1: + + ```shell + mv /usr/local/payara7/glassfish/domains/domain1 /usr/local/payara7/glassfish/domains/domain1_DIST + cp -ar /usr/local/payara7-2026.2/glassfish/domains/domain1 /usr/local/payara7/glassfish/domains/ + ``` + +5. Remove the cache directories: + + ```shell + rm -rf /usr/local/payara7/glassfish/domains/domain1/generated/ + rm -rf /usr/local/payara7/glassfish/domains/domain1/osgi-cache/ + ``` + +6. Update configuration files in the moved domain: + + The file `glassfish-acc.xml` is replaced with the new `payara-acc.xml`, and `default-logging.properties` has been updated in the new Payara distribution. We recommend copying these new files from the distribution domain into your reused domain. + + ```shell + rm /usr/local/payara7/glassfish/domains/domain1/config/glassfish-acc.xml + cp /usr/local/payara7/glassfish/domains/domain1_DIST/config/payara-acc.xml /usr/local/payara7/glassfish/domains/domain1/config/ + cp /usr/local/payara7/glassfish/domains/domain1_DIST/config/default-logging.properties /usr/local/payara7/glassfish/domains/domain1/config/ + ``` + +7. Update JVM options in **domain.xml**: + + Edit `payara7/glassfish/domains/domain1/config/domain.xml` to add the following JVM option to the `server-config` section: + + ```xml + --add-opens=java.base/java.lang.reflect=ALL-UNNAMED + ``` + + Also, check for any JVM options that reference the old Payara path (e.g., `/usr/local/payara7-2026.2`) and update them to the new path (`/usr/local/payara7`). + +8. (Optional): If you use a dedicated service account like `dataverse`, update the ownership permissions: + + ```shell + sudo chown -R dataverse /usr/local/payara7/glassfish/domains/domain1 + ``` + +9. Start Payara: + + ```shell + sudo service payara start + ``` diff --git a/doc/sphinx-guides/source/api/changelog.rst b/doc/sphinx-guides/source/api/changelog.rst index 96142e5b8b1..c61ee41d61e 100644 --- a/doc/sphinx-guides/source/api/changelog.rst +++ b/doc/sphinx-guides/source/api/changelog.rst @@ -26,7 +26,7 @@ v6.12 - **/api/admin/index/perms/{id}** - Dataset creation API calls may now behave differently when neither a license nor terms are provided, depending on the new :ref:`dataverse.feature.do-not-assume-default-license` feature flag. -- Whether file extensions are included in the "Content-disposition" header returned when downloading auxiliary files depends on whether the relevant format is one of the Mimetypes supported in Tika. A recent update to the version of Tika has added new mimetypes, including "text/markdown", and auxiliary files with these types now have a a file extension included (e.g. ".md" in this case) in the header. +- Whether file extensions are included in the "Content-disposition" header returned when downloading auxiliary files depends on whether the relevant format is one of the content types supported in Tika. A recent update to the version of Tika has added new content types, including "text/markdown", and auxiliary files with these types now have a a file extension included (e.g. ".md" in this case) in the header. v6.11 ----- diff --git a/src/test/java/edu/harvard/iq/dataverse/util/JhoveFileTypeTest.java b/src/test/java/edu/harvard/iq/dataverse/util/JhoveFileTypeTest.java index 9f3d09c4345..594ec2e91cf 100644 --- a/src/test/java/edu/harvard/iq/dataverse/util/JhoveFileTypeTest.java +++ b/src/test/java/edu/harvard/iq/dataverse/util/JhoveFileTypeTest.java @@ -86,8 +86,4 @@ public void testGetJhoveConfigFile() { assertEquals(baseDirForConfigFiles + "/config/jhove.conf", JhoveFileType.getJhoveConfigFile()); } - private static void copyConfigIntoPlace() { - // Not needed anymore due to new setup - } - } From 41e68179fcf9ee00bf088aeb2c0b55daa77cb8bb Mon Sep 17 00:00:00 2001 From: qqmyers Date: Wed, 19 Aug 2026 17:22:38 -0400 Subject: [PATCH 13/16] Apply suggestion from @pdurbin Co-authored-by: Philip Durbin --- .../java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java index b5c0c97de93..41d65f30495 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java @@ -258,8 +258,7 @@ public void testUploadAuxFiles() throws IOException { // Download Markdown aux file. Response downloadAuxFileMd = UtilIT.downloadAuxFile(fileId, formatTagMd, formatVersionMd, apiToken); downloadAuxFileMd.then().assertThat().statusCode(OK.getStatusCode()); - // No file extenstion here because Tika's getDefaultMimeTypes doesn't include "text/markdown". - // Note: browsers seem to add ".bin" ("myfile.bin") rather than no extension ("myfile"). + // Tika's getDefaultMimeTypes includes "text/markdown" so ".md" is appended. assertEquals("attachment; filename=\"data.tab.README_0.1.md\"", downloadAuxFileMd.header("Content-disposition")); // Download Markdown aux file with no MIME type given From 1631cbfe58e27a10e00bcad36e1cbf0050a2c02e Mon Sep 17 00:00:00 2001 From: qqmyers Date: Thu, 20 Aug 2026 10:54:47 -0400 Subject: [PATCH 14/16] one more classcast issue --- .../edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java index 98e0b0fc844..c97a665dd0d 100644 --- a/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java @@ -176,7 +176,7 @@ public List getGuestbookResults(Long dataverseId, Long guestbookId ){ public StringBuilder convertGuestbookResponsesToCSV ( Map customQandAs, Map datasetTitles, Object[] result) throws IOException { - Integer guestbookResponseId = (Integer)result[0]; + Integer guestbookResponseId = ((Number)result[0]).intValue(); StringBuilder sb = new StringBuilder(); From e93968b645a48dbff29234b42f5aef2314fffd04 Mon Sep 17 00:00:00 2001 From: qqmyers Date: Thu, 20 Aug 2026 12:27:37 -0400 Subject: [PATCH 15/16] yet one more classcast issue --- .../edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java index c97a665dd0d..fb5eecbe5d3 100644 --- a/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/GuestbookResponseServiceBean.java @@ -190,7 +190,7 @@ public StringBuilder convertGuestbookResponsesToCSV ( Map custo // Dataset name: - Integer datasetId = (Integer) result[2]; + Integer datasetId = ((Number) result[2]).intValue(); String datasetTitle = datasetTitles.get(datasetId); sb.append(datasetTitle == null ? "" : StringEscapeUtils.escapeCsv(datasetTitle)); sb.append(SEPARATOR); From 681c6f6a699431970799a8a916720700dd997035 Mon Sep 17 00:00:00 2001 From: qqmyers Date: Thu, 20 Aug 2026 13:41:00 -0400 Subject: [PATCH 16/16] add sleep for search --- src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java b/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java index 410a72a1054..1c1a9756360 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java @@ -994,6 +994,7 @@ public void testSubtreePermissions() { // Wait a little while for the index to pick up the datasets, otherwise timing issue with searching for it. UtilIT.sleepForDatasetIndex(datasetId2.toString(), apiToken); + UtilIT.sleepForDatasetIndex(datasetId.toString(), apiToken); String identifier = JsonPath.from(datasetAsJson.getBody().asString()).getString("data.identifier"); String identifier2 = JsonPath.from(datasetAsJson2.getBody().asString()).getString("data.identifier");