Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IQSS/11126 payara6.2025.1 #11128

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a5e2926
Always set a localeCode
qqmyers Dec 23, 2024
ecd6425
stop npe
qqmyers Dec 24, 2024
11ae8cb
handle null code
qqmyers Dec 24, 2024
401cd8f
update payara-bom
qqmyers Dec 24, 2024
e6249cf
6-2024-12 domain1 domain
qqmyers Dec 31, 2024
0feef51
domain.xml with standard Dataverse lines
qqmyers Dec 31, 2024
71a9d17
initial release notes
qqmyers Dec 31, 2024
bf5728e
update 6.2024.6 -> 6.2024.12
qqmyers Jan 2, 2025
1b8c2db
convert to /> form
qqmyers Jan 2, 2025
7513bc8
match payara formatting
qqmyers Jan 2, 2025
1f2ffc6
add jk-connector
qqmyers Jan 2, 2025
5e68569
release note updates/simplify
qqmyers Jan 2, 2025
f9f1bc4
cp whole docroot in option2
qqmyers Jan 8, 2025
c688b92
#11126 bump to Payara-6.2025.1
donsizemore Jan 22, 2025
3196c11
Merge pull request #118 from uncch-rdmc/IQSS/11126-Payara6.2024.12
qqmyers Jan 22, 2025
2e71bc3
updated for 6.2025.1
qqmyers Jan 22, 2025
c3cb27c
Merge branch 'IQSS/11126-Payara6.2024.12' of https://github.com/Quali…
qqmyers Jan 22, 2025
12259fc
Merge remote-tracking branch 'IQSS/develop' into IQSS/11126-Payara6.2…
qqmyers Jan 22, 2025
de787ba
#11126 per qqmyers we want curl -L -O
donsizemore Jan 28, 2025
c8ed23e
Merge pull request #119 from uncch-rdmc/IQSS/11126-Payara6.2024.12
qqmyers Jan 28, 2025
0f8d475
Merge remote-tracking branch 'IQSS/develop' into IQSS/11126-Payara6.2…
qqmyers Jan 30, 2025
522a19c
rearrange f:metadata for dataset, dataverse
qqmyers Jan 28, 2025
9211d8e
move f:metadata to be child of view in the rest using dataverse-template
qqmyers Jan 30, 2025
c5c46a7
correct directory
qqmyers Jan 30, 2025
3b55bbb
Merge branch 'IQSS/11126-Payara6.2024.12' of
qqmyers Jan 30, 2025
b3b243f
additional f:metadata moves
qqmyers Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
612 changes: 612 additions & 0 deletions conf/payara/domain.xml

Large diffs are not rendered by default.

206 changes: 206 additions & 0 deletions doc/release-notes/6.2025.1_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
- Payara application server has been upgraded to version 6.2025.1.

## Installation

The following assumes the standard instructions to undeploy v6.5, stop payara, `export PAYARA=/usr/local/payara6`, etc. have been done already.

### Upgrade to Payara 6.2025.1

Option 1:

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:
[Payara Release Notes](https://docs.payara.fish/community/docs/6.2025.1/Release%20Notes/Release%20Notes%206.2025.1.html).
We also recommend you ensure you followed all update instructions from the past releases regarding Payara.
(The most recent Payara update was for [v6.3](https://github.com/IQSS/dataverse/releases/tag/v6.3).)

Move the current Payara directory out of the way:

```shell
mv $PAYARA $PAYARA.6.2024.6
```

Download the new Payara version 6.2025.1 (from https://www.payara.fish/downloads/payara-platform-community-edition/), and unzip it in its place:

```shell
cd /usr/local
unzip payara-6.2025.1.zip
```

Replace the brand new `payara/glassfish/domains/domain1` with your old, preserved domain1:

```shell
mv payara6/glassfish/domains/domain1 payara6/glassfish/domains/domain1_DIST
mv payara6-2024.6/glassfish/domains/domain1 payara6/glassfish/domains/
```

Deploy/install as normal

Option2 : Modify the default 6.2025.1 domain1 configuration for your Dataverse instance. (Removes obsolete options, gets updated certificate store, makes tracking your Dataverse-specific changes relative to the the Payara default easier.)

1. Stop Payara 6, if running.

``
sudo -u dataverse /usr/local/payara6/bin/asadmin stop-domain
``
1. Move your existing payara installation to a backup directory

```shell
mv $PAYARA $PAYARA.6.2024.6
```

1. Download Payara 6.2025.1 and unzip it

```shell
cd /usr/local
curl -L -O https://nexus.payara.fish/repository/payara- community/fish/payara/distributions/payara/6.2025.1/payara-6.2025.1.zip
unzip payara-6.2025.1.zip
```

1. Change ownership of the unzipped Payara to your "service" user ("dataverse" by default)

`sudo chown -R dataverse /usr/local/payara6`

1. Create a Dataverse-specific domain.xml file

i. Make a copy of the default domain.xml file (to be able to compare against later)

``sudo -u dataverse cp /usr/local/payara6/glassfish/domains/domain1/config/domain.xml /usr/local/payara6/glassfish/domains/domain1/config/domain.xml.orig``

ii. Retrieve the domain.xml file for this version of Dataverse

```shell
cd /usr/local
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this option is kept, the cd should be to /usr/local/glassfish/domains/domain1/config
and curl should have the -L -O options

curl https://github.com/IQSS/dataverse/raw/refs/tags/v6.6/conf/payara/domain.xml
```

iii. Copy Dataverse-related lines from your existing domain.xml to sections of the new domain.xml highlighted by `Dataverse-instance-specific` comments

`sudo egrep 'dataverse|doi|Xmx' /usr/local/$PAYARA.6.2024.6/glassfish/domains/domain1/config/domain.xml > lines.txt`

`sudo vi /usr/local/payara6/glassfish/domains/domain1/config/domain.xml`


The lines will appear in two sections, examples shown below (but your content will vary)


Section 1: system properties (under `<server name="server" config-ref="server-config">`


```
<system-property name="dataverse.db.user" value="dvnuser"></system-property>

<system-property name="dataverse.db.host" value="localhost"></system-property>

<system-property name="dataverse.db.port" value="5432"></system-property>

<system-property name="dataverse.db.name" value="dvndb"></system-property>

<system-property name="dataverse.db.password" value="dvnsecret"></system-property>

```


Note: if you used the Dataverse installer, you won't have a `dataverse.db.password` property. See "Create password aliases" below


Section 2: JVM options (under `<java-config classpath-suffix="" debug-options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="">`, the one under `<config name="server-config">`, not under `<config name="default-config">`


Add the remaining lines (starting with `<jvm-options>` )from lines.txt created above, e.g.


```

<jvm-options>-Ddataverse.files.directory=/usr/local/dvn/data</jvm-options

<jvm-options>-Ddataverse.files.file.type=file</jvm-options

<jvm-options>-Ddataverse.files.file.label=file</jvm-options

<jvm-options>-Ddataverse.files.file.directory=/usr/local/dvn/data</jvm-options

<jvm-options>-Ddataverse.rserve.host=localhost</jvm-options

<jvm-options>-Ddataverse.rserve.port=6311</jvm-options

<jvm-options>-Ddataverse.rserve.user=rserve</jvm-options

<jvm-options>-Ddataverse.rserve.password=rserve</jvm-options

<jvm-options>-Ddataverse.auth.password-reset-timeout-in-minutes=60</jvm-options

<jvm-options>-Ddataverse.timerServer=true</jvm-options

<jvm-options>-Ddataverse.fqdn=dev1.dataverse.org</jvm-options

<jvm-options>-Ddataverse.siteUrl=https://dev1.dataverse.org</jvm-options

<jvm-options>-Ddataverse.files.storage-driver-id=file</jvm-options

<jvm-options>-Ddoi.username=testaccount</jvm-options

<jvm-options>-Ddoi.password=notmypassword</jvm-options

<jvm-options>-Ddoi.baseurlstring=https://mds.test.datacite.org/</jvm-options

<jvm-options>-Ddoi.dataciterestapiurlstring=https://api.test.datacite.org</jvm-options

```

- If you've enabled access logging or any other site-specific configuration, be sure to preserve them. For instance, the default domain.xml include


```

<http-service

<access-log></access-log

```


but you may wish to include


```

<http-service access-logging-enabled="true"

<access-log format="%client.name% %datetime% %request% %status% %response.length% %header.user-agent% %header.referer% %cookie.JSESSIONID% %header.x-forwarded-for%"></access-log

```


Be sure to keep a previous copy of your domain.xml for reference


1. Update additional files from your existing Payara configuration

i. Copy jhove files

`jhove.conf` and `jhoveConfig.xsd`


`sudo cp /usr/local/$PAYARA.6.2024.6/glassfish/domains/domain1/config/jhove* /usr/local/payara6/glassfish/domains/domain1/config/`

ii. Replace the default `domain-passwords` files with yours


`sudo cp /usr/local/$PAYARA.6.2024.6/glassfish/domains/domain1/config/domain-passwords /usr/local/payara6/glassfish/domains/domain1/config/`

iii. Optional: add any dataverse specific lines in your existing logging.properties file to the default one

`sudo vi /usr/local/payara6/glassfish/domains/domain1/config/logging.properties`

iv. Assure all config files are owned by the dataverse user

`sudo chown dataverse /usr/local/payara6/glassfish/domains/domain1/config/*`

1. Copy/move logos and other files from from your old domain to the new one, e.g.


`sudo -u dataverse mv -r /usr/local/$PAYARA.6.2024.6/glassfish/domains/domain1/docroot /usr/local/payara6/glassfish/domains/domain1`

`sudo -u dataverse mv -r /usr/local/$PAYARA.6.2024.6/glassfish/domains/domain1/files /usr/local/payara6/glassfish/domains/domain1`

`sudo -u dataverse mv -r /usr/local/$PAYARA.6.2024.6/glassfish/domains/domain1/logs /usr/local/payara6/glassfish/domains/logs`
6 changes: 3 additions & 3 deletions doc/sphinx-guides/source/developers/classic-dev-env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ On Linux, install ``jq`` from your package manager or download a binary from htt
Install Payara
~~~~~~~~~~~~~~

Payara 6.2024.6 or higher is required.
Payara 6.2025.1 or higher is required.

To install Payara, run the following commands:

``cd /usr/local``

``sudo curl -O -L https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.6/payara-6.2024.6.zip``
``sudo curl -O -L https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2025.1/payara-6.2025.1.zip``

``sudo unzip payara-6.2024.6.zip``
``sudo unzip payara-6.2025.1.zip``

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

Expand Down
6 changes: 3 additions & 3 deletions doc/sphinx-guides/source/installation/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ On RHEL/derivative you can make Java 17 the default with the ``alternatives`` co
Payara
------

Payara 6.2024.6 is recommended. Newer versions might work fine. Regular updates are recommended.
Payara 6.2025.1 is recommended. Newer versions might work fine. Regular updates are recommended.

Installing Payara
=================
Expand All @@ -55,8 +55,8 @@ Installing Payara

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

# wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.6/payara-6.2024.6.zip
# unzip payara-6.2024.6.zip
# wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2025.1/payara-6.2025.1.zip
# unzip payara-6.2025.1.zip
# mv payara6 /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/
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/qa/test-automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Go to the end of the log and then scroll up, looking for the failure. A failed A

```
TASK [dataverse : download payara zip] *****************************************
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"}
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.1/payara-6.2025.1.zip"}
```

In the example above, if Payara can't be downloaded, we're obviously going to have problems deploying Dataverse to it!
Expand Down
2 changes: 1 addition & 1 deletion modules/dataverse-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<argLine>-Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region}</argLine>

<!-- Major system components and dependencies -->
<payara.version>6.2024.6</payara.version>
<payara.version>6.2025.1</payara.version>
<postgresql.version>42.7.4</postgresql.version>
<solr.version>9.4.1</solr.version>
<aws.version>1.12.748</aws.version>
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -6214,7 +6214,7 @@ public String getEffectiveMetadataLanguage(boolean ofParent) {

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

public String getFieldLanguage(String languages) {
//Prevent NPE in Payara 6-2024-12 with CVoc
logger.info("Languages: " + languages);
if(languages==null) {
languages="";
}
return fieldService.getFieldLanguage(languages,session.getLocaleCode());
}

Expand Down
22 changes: 10 additions & 12 deletions src/main/java/edu/harvard/iq/dataverse/DataverseSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,19 +209,17 @@ public String getLocaleTitle() {

public void initLocale() {

if(FacesContext.getCurrentInstance() == null) {
localeCode = "en";
}
else if (FacesContext.getCurrentInstance().getViewRoot() == null ) {
localeCode = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale().getLanguage();
}
else if (FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage().equals("en_US")) {
localeCode = "en";
}
else {
localeCode = FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage();

localeCode = "en";
if (FacesContext.getCurrentInstance() != null) {
if (FacesContext.getCurrentInstance().getViewRoot() == null) {
localeCode = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale().getLanguage();
} else if (FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage().equals("en_US")) {
localeCode = "en";
} else {
localeCode = FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage();
}
}

logger.fine("init: locale set to "+localeCode);
}

Expand Down
Loading