Skip to content

Commit 13cbc1e

Browse files
authored
Merge pull request #11128 from QualitativeDataRepository/IQSS/11126-Payara6.2024.12
Upgrade to Payara 6 2025.2
2 parents 366d7ac + 55476d5 commit 13cbc1e

28 files changed

+156
-72
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
- Payara application server has been upgraded to version 6.2025.2. See #11126 and #11128.
2+
3+
## Installation
4+
5+
The following assumes the standard instructions to `export PAYARA=/usr/local/payara6`, undeploy v6.5, stop payara have been done already.
6+
7+
### Upgrade to Payara 6.2025.2
8+
9+
The steps below reuse your existing domain directory with the new distribution. You may also want to review the Payara upgrade instructions as it could be helpful during any troubleshooting:
10+
[Payara Release Notes](https://docs.payara.fish/community/docs/6.2025.2/Release%20Notes/Release%20Notes%206.2025.2.html).
11+
We also recommend you ensure you followed all update instructions from the past releases regarding Payara.
12+
(The most recent Payara update was for [v6.3](https://github.com/IQSS/dataverse/releases/tag/v6.3).)
13+
14+
Move the current Payara directory out of the way:
15+
16+
```shell
17+
mv $PAYARA $PAYARA.6.2024.6
18+
```
19+
20+
Download the new Payara version 6.2025.2 (from https://www.payara.fish/downloads/payara-platform-community-edition/ or https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2025.2/payara-6.2025.2.zip), and unzip it in its place:
21+
22+
```shell
23+
cd /usr/local
24+
unzip payara-6.2025.2.zip
25+
```
26+
27+
Replace the brand new `payara/glassfish/domains/domain1` with your old, preserved domain1:
28+
29+
```shell
30+
mv payara6/glassfish/domains/domain1 payara6/glassfish/domains/domain1_DIST
31+
mv payara6.6.2024.6/glassfish/domains/domain1 payara6/glassfish/domains/
32+
```
33+
34+
Deploy/install as normal
35+

doc/sphinx-guides/source/developers/classic-dev-env.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ On Linux, install ``jq`` from your package manager or download a binary from htt
9393
Install Payara
9494
~~~~~~~~~~~~~~
9595

96-
Payara 6.2024.6 or higher is required.
96+
Payara 6.2025.2 or higher is required.
9797

9898
To install Payara, run the following commands:
9999

100100
``cd /usr/local``
101101

102-
``sudo curl -O -L https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.6/payara-6.2024.6.zip``
102+
``sudo curl -O -L https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2025.2/payara-6.2025.2.zip``
103103

104-
``sudo unzip payara-6.2024.6.zip``
104+
``sudo unzip payara-6.2025.2.zip``
105105

106106
``sudo chown -R $USER /usr/local/payara6``
107107

doc/sphinx-guides/source/developers/tips.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,3 +296,14 @@ with the following code in ``SettingsWrapper.java``:
296296
A more serious example would be direct calls to PermissionServiceBean methods used in render logic expressions. This is something that has happened and caused some problems in real life. A simple permission service lookup (for example, whether a user is authorized to create a dataset in the current dataverse) can easily take 15 database queries. Repeated multiple times, this can quickly become a measurable delay in rendering the page. PermissionsWrapper must be used exclusively for any such lookups from JSF pages.
297297

298298
See also :doc:`performance`.
299+
300+
JSF1103 Errors
301+
~~~~~~~~~~~~~~
302+
303+
Errors of the form ``JSF1103: The metadata facet must be a direct child of the view in viewId /dataverse.xhtml`` come from use of the f:metadata tag at the wrong depth in the .xhtml.
304+
305+
Most/all known instances of the problem were corrected in https://github.com/IQSS/dataverse/pull/11128.
306+
307+
Any page that used <ui:composition template="/dataverse_template.xhtml"> was including the f:metadata farther down in the tree rather than as a direct child of the view.
308+
As of Payara 6.2025.2, it is not clear that this error was resulting in changes to UI behavior, but the error messages were in the log.
309+
If you see these errors, this note and the examples in the PR will hopefully provide some insight as to how to fix them.

doc/sphinx-guides/source/installation/prerequisites.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ On RHEL/derivative you can make Java 17 the default with the ``alternatives`` co
4444
Payara
4545
------
4646

47-
Payara 6.2024.6 is recommended. Newer versions might work fine. Regular updates are recommended.
47+
Payara 6.2025.2 is recommended. Newer versions might work fine. Regular updates are recommended.
4848

4949
Installing Payara
5050
=================
@@ -55,8 +55,8 @@ Installing Payara
5555

5656
- Download and install Payara (installed in ``/usr/local/payara6`` in the example commands below)::
5757

58-
# wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.6/payara-6.2024.6.zip
59-
# unzip payara-6.2024.6.zip
58+
# wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2025.2/payara-6.2025.2.zip
59+
# unzip payara-6.2025.2.zip
6060
# mv payara6 /usr/local
6161

6262
If nexus.payara.fish is ever down for maintenance, Payara distributions are also available from https://repo1.maven.org/maven2/fish/payara/distributions/payara/

doc/sphinx-guides/source/qa/test-automation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Go to the end of the log and then scroll up, looking for the failure. A failed A
5252

5353
```
5454
TASK [dataverse : download payara zip] *****************************************
55-
fatal: [localhost]: FAILED! => {"changed": false, "dest": "/tmp/payara.zip", "elapsed": 10, "msg": "Request failed: <urlopen error timed out>", "url": "https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.6/payara-6.2024.6.zip"}
55+
fatal: [localhost]: FAILED! => {"changed": false, "dest": "/tmp/payara.zip", "elapsed": 10, "msg": "Request failed: <urlopen error timed out>", "url": "https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2025.2/payara-6.2025.2.zip"}
5656
```
5757

5858
In the example above, if Payara can't be downloaded, we're obviously going to have problems deploying Dataverse to it!

modules/dataverse-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
<argLine>-Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region}</argLine>
149149

150150
<!-- Major system components and dependencies -->
151-
<payara.version>6.2024.6</payara.version>
151+
<payara.version>6.2025.2</payara.version>
152152
<postgresql.version>42.7.4</postgresql.version>
153153
<solr.version>9.8.0</solr.version>
154154
<aws.version>1.12.748</aws.version>

src/main/java/edu/harvard/iq/dataverse/DatasetPage.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6235,7 +6235,7 @@ public String getEffectiveMetadataLanguage(boolean ofParent) {
62356235

62366236
public String getLocaleDisplayName(String code) {
62376237
String displayName = settingsWrapper.getBaseMetadataLanguageMap(false).get(code);
6238-
if(displayName==null && !code.equals(DvObjectContainer.UNDEFINED_CODE)) {
6238+
if(displayName==null && code!=null && !code.equals(DvObjectContainer.UNDEFINED_CODE)) {
62396239
//Default (for cases such as :when a Dataset has a metadatalanguage code but :MetadataLanguages is no longer defined).
62406240
displayName = new Locale(code).getDisplayName();
62416241
}
@@ -6251,6 +6251,11 @@ public List<String> getVocabScripts() {
62516251
}
62526252

62536253
public String getFieldLanguage(String languages) {
6254+
//Prevent NPE in Payara 6-2024-12 with CVoc
6255+
logger.info("Languages: " + languages);
6256+
if(languages==null) {
6257+
languages="";
6258+
}
62546259
return fieldService.getFieldLanguage(languages,session.getLocaleCode());
62556260
}
62566261

src/main/java/edu/harvard/iq/dataverse/DataverseSession.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -209,19 +209,17 @@ public String getLocaleTitle() {
209209

210210
public void initLocale() {
211211

212-
if(FacesContext.getCurrentInstance() == null) {
213-
localeCode = "en";
214-
}
215-
else if (FacesContext.getCurrentInstance().getViewRoot() == null ) {
216-
localeCode = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale().getLanguage();
217-
}
218-
else if (FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage().equals("en_US")) {
219-
localeCode = "en";
220-
}
221-
else {
222-
localeCode = FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage();
212+
213+
localeCode = "en";
214+
if (FacesContext.getCurrentInstance() != null) {
215+
if (FacesContext.getCurrentInstance().getViewRoot() == null) {
216+
localeCode = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale().getLanguage();
217+
} else if (FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage().equals("en_US")) {
218+
localeCode = "en";
219+
} else {
220+
localeCode = FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage();
221+
}
223222
}
224-
225223
logger.fine("init: locale set to "+localeCode);
226224
}
227225

src/main/webapp/ThemeAndWidgets.xhtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
<ui:param name="dataverse" value="#{themeWidgetFragment.editDv}"/>
1616

1717
<ui:param name="showMessagePanel" value="#{true}"/>
18-
<ui:define name="body">
18+
<ui:define name="metadata">
1919
<f:metadata>
2020
<f:viewParam name="id" value="#{themeWidgetFragment.editDv.id}"/>
2121
<f:viewAction action="#{themeWidgetFragment.initEditDv}"/>
2222
<f:viewAction action="#{dataverseHeaderFragment.initBreadcrumbs(themeWidgetFragment.editDv, bundle['dataverse.option.themeAndWidgets'])}"/>
2323
</f:metadata>
24+
</ui:define>
25+
<ui:define name="body">
2426
<h:form id="themeWidgetsForm">
2527
<ui:include src="themeAndWidgetsFragment.xhtml"/>
2628
</h:form>

src/main/webapp/confirmemail.xhtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@
1414
<ui:param name="dataverse" value="#{dataverseServiceBean.findRootDataverse()}"/>
1515
<ui:param name="showDataverseHeader" value="false"/>
1616
<ui:param name="loginRedirectPage" value="dataverse.xhtml"/>
17-
<ui:define name="body">
17+
<ui:define name="metadata">
1818
<f:metadata>
1919
<f:viewParam name="token" value="#{ConfirmEmailPage.token}"/>
2020
<f:viewAction action="#{dataverseSession.updateLocaleInViewRoot}"/>
2121
<f:viewAction action="#{ConfirmEmailPage.init}" />
2222
</f:metadata>
23+
</ui:define>
24+
<ui:define name="body">
2325

2426
<!--This is just the button. The error message is added via addErrorMessage in the backing bean.-->
2527
<h:form styleClass="form-horizontal" rendered="#{ConfirmEmailPage.invalidToken}">

0 commit comments

Comments
 (0)