Skip to content

Commit 3c4221f

Browse files
committed
Merge branch 'develop' into 7263-dismissable-banner
2 parents 027729f + 25cb2eb commit 3c4221f

18 files changed

Lines changed: 29 additions & 84 deletions

File tree

conf/docker-aio/testscripts/install

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export SMTP_SERVER=localhost
1515
export MEM_HEAP_SIZE=2048
1616
export GLASSFISH_DOMAIN=domain1
1717
cd scripts/installer
18-
cp pgdriver/postgresql-42.2.12.jar $GLASSFISH_ROOT/glassfish/lib
1918
#cp ../../conf/jhove/jhove.conf $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhove.conf
2019
cp /opt/dv/testdata/jhove.conf $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhove.conf
2120
cp /opt/dv/testdata/jhoveConfig.xsd $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhoveConfig.xsd
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Reset the EJB timer database back to default:
2+
```
3+
<payara install path>/asadmin set configs.config.server-config.ejb-container.ejb-timer-service.timer-datasource=jdbc/__TimerPool
4+
```
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/bin/sh
22

3-
# EBJ timers sometimes cause problems; utility to clear generated directories and database rows
3+
# EBJ timers sometimes cause problems; utility to clear generated directories
44

5-
# assumes this script is being run as root, and that the postgres user had passwordless
6-
# access to the database (local sockets, or appropriate environmental variables).
5+
# assumes this script is being run as root
76

87
# will restart Payara if it's stopped; comment out the `start-domain` command at the end
98
# if you'd like to avoid that.
@@ -14,19 +13,11 @@ PAYARA_DIR=/usr/local/payara5
1413
# directory within Payara (defaults)
1514
DV_DIR=${PAYARA_DIR}/glassfish/domains/domain1
1615

17-
# name of dataverse database
18-
DV_DB=dvndb
19-
20-
# OS user for the database
21-
DB_USER=postgres
22-
2316
# stop the domain (generates a warning if app server is stopped)
2417
${PAYARA_DIR}/bin/asadmin stop-domain
2518

2619
rm -rf ${PAYARA_DIR}/${DV_DIR}/generated/
2720
rm -rf ${PAYARA_DIR}/${DV_DIR}/osgi-cache/felix
2821

29-
sudo -u ${DB_USER} psql ${DV_DB} -c 'delete from "EJB__TIMER__TBL"';
30-
3122
# restart the domain (also generates a warning if app server is stopped)
3223
${PAYARA_DIR}/bin/asadmin start-domain

doc/sphinx-guides/source/admin/timers.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ The following JVM option instructs the application to act as the dedicated timer
2222

2323
``-Ddataverse.timerServer=true``
2424

25-
**IMPORTANT:** Note that this option is automatically set by the Dataverse installer script. That means that when **configuring a multi-server cluster**, it will be the responsibility of the installer to remove the option from the :fixedwidthplain:`domain.xml` of every node except the one intended to be the timer server. We also recommend that the following entry in the :fixedwidthplain:`domain.xml`: ``<ejb-timer-service timer-datasource="jdbc/VDCNetDS">`` is changed back to ``<ejb-timer-service>`` on all the non-timer server nodes. Similarly, this option is automatically set by the installer script. Changing it back to the default setting on a server that doesn't need to run the timer will prevent a potential race condition, where multiple servers try to get a lock on the timer database.
26-
27-
**Note** that for the timer to work, the version of the PostgreSQL JDBC driver your instance is using must match the version of your PostgreSQL database. See the :ref:`timer-not-working` section of Troubleshooting in the Admin Guide.
25+
**IMPORTANT:** Note that this option is automatically set by the Dataverse installer script. That means that when **configuring a multi-server cluster**, it will be the responsibility of the installer to remove the option from the :fixedwidthplain:`domain.xml` of every node except the one intended to be the timer server.
2826

2927
Harvesting Timers
3028
-----------------
@@ -44,7 +42,7 @@ This timer runs a daily job that tries to export all the local, published datase
4442

4543
This daily job will also update all the harvestable OAI sets configured on your server, adding new and/or newly published datasets or marking deaccessioned datasets as "deleted" in the corresponding sets as needed.
4644

47-
This job is automatically scheduled to run at 2AM local time every night. If really necessary, it is possible (for an advanced user) to change that time by directly editing the EJB timer application table in the database.
45+
This job is automatically scheduled to run at 2AM local time every night.
4846

4947
.. _saved-search-timer:
5048

doc/sphinx-guides/source/admin/troubleshooting.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,12 @@ We don't know what's causing this issue, but here's a known workaround:
9898

9999
- Stop Payara;
100100

101-
- Remove the ``generated`` and ``osgi-cache`` directories;
102-
103-
- Delete all the rows from the ``EJB__TIMER__TBL`` table in the database;
101+
- Remove the ``generated`` and ``osgi-cache`` directories;
104102

105103
- Start Payara
106104

107105
The shell script below performs the steps above.
108-
Note that it may or may not work on your system, so it is provided as an example only, downloadable :download:`here </_static/util/clear_timer.sh>`. Aside from the configuration values that need to be changed to reflect your environment (the Payara directory, name of the database, etc.) the script relies on the database being configured in a certain way for access. (See the comments in the script for more information)
106+
Note that it may or may not work on your system, so it is provided as an example only, downloadable :download:`here </_static/util/clear_timer.sh>`. The configuration values might need to be changed to reflect your environment (the Payara directory). See the comments in the script for more information.
109107

110108
.. literalinclude:: ../_static/util/clear_timer.sh
111109

@@ -114,7 +112,7 @@ Note that it may or may not work on your system, so it is provided as an example
114112
Timer Not Working
115113
-----------------
116114

117-
Dataverse relies on EJB timers to perform scheduled tasks: harvesting from remote servers, updating the local OAI sets and running metadata exports. (See :doc:`timers` for details.) If these scheduled jobs are not running on your server, this may be the result of the incompatibility between the version of PostgreSQL database you are using, and PostgreSQL JDBC driver in use by your instance of Payara. The symptoms:
115+
Dataverse relies on EJB timers to perform scheduled tasks: harvesting from remote servers, updating the local OAI sets and running metadata exports. (See :doc:`timers` for details.) If these scheduled jobs are not running on your server, you might experience the following symptoms:
118116

119117
If you are seeing the following in your server.log...
120118

@@ -127,9 +125,9 @@ followed by an Exception stack trace with these lines in it:
127125
:fixedwidthplain:`Exception Description: Could not deserialize object from byte array` ...
128126

129127

130-
... it most likely means that it is the JDBC driver incompatibility that's preventing the timer from working correctly.
131-
Make sure you install the correct version of the driver. For example, if you are running the version 9.3 of PostgreSQL, make sure you have the driver postgresql-9.3-1104.jdbc4.jar in your :fixedwidthplain:`<PAYARA FOLDER>/glassfish/lib` directory. Go `here <https://jdbc.postgresql.org/download.html>`_
132-
to download the correct version of the driver. If you have an older driver in glassfish/lib, make sure to remove it, replace it with the new version and restart Payara. (You may need to remove the entire contents of :fixedwidthplain:`<PAYARA FOLDER>/glassfish/domains/domain1/generated` before you start Payara).
128+
... you should reach out by opening an issue. In the good old days of running Dataverse 4 running on Glassfish 4, this
129+
was a hint for an unsupported JDBC driver. In Dataverse 5 this would be a new regression and its cause would need to be
130+
investigated.
133131

134132

135133
Constraint Violations Issues

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ Switching from Glassfish to Payara
176176
If you already have a working dev environment with Glassfish and want to switch to Payara, you must do the following:
177177

178178
- Copy the "domain1" directory from Glassfish to Payara.
179-
- Copy the PostgreSQL driver into place like this: ``cp scripts/installer/pgdriver/postgresql-42.*.jar /usr/local/payara5/glassfish/lib``
180179

181180
----
182181

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ Fresh Reinstall
208208
Early on when you're installing Dataverse, you may think, "I just want to blow away what I've installed and start over." That's fine. You don't have to uninstall the various components like Payara, PostgreSQL and Solr, but you should be conscious of how to clear out their data. For Payara, a common helpful process is to:
209209

210210
- Stop Payara;
211-
- Remove the ``generated`` and ``osgi-cache`` directories;
212-
- Delete all the rows from the ``EJB__TIMER__TBL`` table in the database;
211+
- Remove the ``generated`` and ``osgi-cache`` directories;
213212
- Start Payara
214213

215214
Drop database

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
<jakartaee-api.version>8.0.0</jakartaee-api.version>
2929
<payara.version>5.2020.6</payara.version>
30+
<postgresql.version>42.2.18</postgresql.version>
3031
<aws.version>1.11.762</aws.version>
3132
<commons.logging.version>1.2</commons.logging.version>
3233
<httpcomponents.client.version>4.5.5</httpcomponents.client.version>
@@ -263,6 +264,11 @@
263264
<artifactId>jbcrypt</artifactId>
264265
<version>0.3m</version>
265266
</dependency>
267+
<dependency>
268+
<groupId>org.postgresql</groupId>
269+
<artifactId>postgresql</artifactId>
270+
<version>${postgresql.version}</version>
271+
</dependency>
266272
<dependency>
267273
<groupId>org.flywaydb</groupId>
268274
<artifactId>flyway-core</artifactId>

scripts/database/homebrew/devinstall

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ export FILES_DIR=$HOME/dataverse/files
1515
export MEM_HEAP_SIZE=2048
1616
export GLASSFISH_DOMAIN=domain1
1717
export GLASSFISH_ROOT=/Applications/NetBeans/glassfish4
18-
cp pgdriver/postgresql-9.1-902.jdbc4.jar $GLASSFISH_ROOT/glassfish/lib
1918
cp ../../conf/jhove/jhove.conf $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhove.conf
2019
./glassfish-setup.sh

scripts/deploy/phoenix.dataverse.org/install

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ export SMTP_SERVER=localhost
1515
export MEM_HEAP_SIZE=2048
1616
export GLASSFISH_DOMAIN=domain1
1717
cd scripts/installer
18-
cp pgdriver/postgresql-8.4-703.jdbc4.jar $GLASSFISH_ROOT/glassfish/lib
1918
cp ../../conf/jhove/jhove.conf $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhove.conf
2019
./glassfish-setup.sh

0 commit comments

Comments
 (0)