Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4c5a940
Include the PostgreSQL JDBC driver in pom.xml as a dependency. #6819
poikilotherm Jul 1, 2020
9f97abe
Remove any stale references about installing, copying, moving, ... of…
poikilotherm Jul 1, 2020
9e7751d
Merge branch 'develop' into 6819-include-postgres
poikilotherm Jul 13, 2020
9e7de2e
Remove obsolete driver package in codebase of installer. #6819
poikilotherm Jul 13, 2020
7ed1de7
Remove installation of Postgres driver from the old Perl installer, t…
poikilotherm Jul 13, 2020
e90d9e7
Provide @DataSourceDefinition for app-level DB config. #6819
poikilotherm Jul 13, 2020
0aaac25
Cleanup installer, code and docs relying on the DB connection. #6819
poikilotherm Jul 13, 2020
c2e00fd
Merge branch 'develop' into 6819-include-postgres
poikilotherm Aug 3, 2020
795b02f
Make the DataSourceDefinition configureable using MicroProfile Config…
poikilotherm Aug 3, 2020
1052985
Make installer use the new system properties for database connection …
poikilotherm Aug 3, 2020
2e6b6f9
Merge branch 'develop' into 6819-include-postgres
poikilotherm Oct 23, 2020
3d2d98a
Switch to complete MPCONFIG style of DataSourceDefinition by requirin…
poikilotherm Oct 26, 2020
550d37f
Add defaults for the database connection using a MicroProfile Config …
poikilotherm Oct 26, 2020
12780b1
Merge branch 'develop' into 6819-include-postgres
poikilotherm Oct 26, 2020
ae790a4
Require Payara 5.2020.5, including release note about updating.
poikilotherm Nov 4, 2020
1075ab4
Add new properties to install docs plus add release notes how to upda…
poikilotherm Nov 4, 2020
aedd5df
Minor tweaks to docs and release note. #6819
poikilotherm Nov 4, 2020
7a1c7a7
Release notes: let people update the EJB timer database connection on…
poikilotherm Nov 6, 2020
454be3d
Merge branch 'develop' into 6819-include-postgres
poikilotherm Nov 6, 2020
7a668f5
Update doc/release-notes/6819-update-db-conn.md
poikilotherm Nov 6, 2020
446581b
Include microprofile-config.properties in WAR. #6819
poikilotherm Nov 9, 2020
3c8f3d1
Merge branch 'develop' into 6819-include-postgres
poikilotherm Nov 9, 2020
d97b6ee
Fix typo in release notes about deleting the JDBC pool. #6819
poikilotherm Nov 9, 2020
dfd39b1
Update release docs for upgrading, enhanced with the DB mangling. #6819
poikilotherm Nov 9, 2020
93d3b6a
Merge release notes about Payara update and DB connection. Emphasize …
poikilotherm Nov 10, 2020
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
1 change: 0 additions & 1 deletion conf/docker-aio/testscripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export SMTP_SERVER=localhost
export MEM_HEAP_SIZE=2048
export GLASSFISH_DOMAIN=domain1
cd scripts/installer
cp pgdriver/postgresql-42.2.12.jar $GLASSFISH_ROOT/glassfish/lib
#cp ../../conf/jhove/jhove.conf $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhove.conf
cp /opt/dv/testdata/jhove.conf $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhove.conf
cp /opt/dv/testdata/jhoveConfig.xsd $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhoveConfig.xsd
Expand Down
82 changes: 82 additions & 0 deletions doc/release-notes/6819-update-payara+db-conn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
## Easier Configuration of Database Connections

Dataverse now being able to use up-to-date Java technologies, transforms
the way how to configure the connection to your PostgreSQL database.

In the past, the configuration of the connection has been quite static
and not very easy to update. This has been an issue especially for cloud
and container usage.

Using MicroProfile Config API, you can much more easily deposit configuration
details. For an overview of supported options, please see the
[installation guide](https://guides.dataverse.org/en/5.2/installation/config.html#jvm-options).

## Update to Payara Platform 5.2020.5

In contrast to good old Glassfish 4, the Payara application server
is a maintained product, receiving both feature and - more important -
security and dependent technology updates. You should update the
application server platform on a regular basis, as it is a key component
of a running Dataverse deployment.

🚨 THIS VERSION OF DATAVERSE **REQUIRES** UPGRADING TO PAYARA 5.2020.5. 🚨

Some bugs related to the new database connection configuration via MicroProfile Config
have been fixed. You will run into troubles when not upgrading.

Instructions how to update can be found in the
[Payara documentation](https://docs.payara.fish/community/docs/5.2020.5/documentation/user-guides/upgrade-payara.html)

## Upgrading from earlier releases

ℹ️ You need to update the Payara Application Server before continuing here. See above.

1. Undeploy the previous version.
```
<payara install path>/asadmin list-applications
<payara install path>/asadmin undeploy dataverse-<version>
```

(where `<payara install path>` is where Payara 5 is installed, for example: `/usr/local/payara5`)

2. Update your database connection before updating.

Please configure your connection details, replacing all the `${DB_...}`.
(If you are using a PostgreSQL server on `localhost:5432`, you can omit `dataverse.db.host` and `dataverse.db.port`.)

```
<payara install path>/asadmin create-system-properties "dataverse.db.user=${DB_USER}"
<payara install path>/asadmin create-system-properties "dataverse.db.host=${DB_HOST}"
<payara install path>/asadmin create-system-properties "dataverse.db.port=${DB_PORT}"
<payara install path>/asadmin create-system-properties "dataverse.db.name=${DB_NAME}"

echo "AS_ADMIN_ALIASPASSWORD=${DB_PASS}" > /tmp/password.txt
<payara install path>/asadmin create-password-alias --passwordfile /tmp/password.txt dataverse.db.password
rm /tmp/password.txt
```

After switching EJB timers to the new data source, you are safe to delete the old alias and DB pool:
```
<payara install path>/asadmin set configs.config.server-config.ejb-container.ejb-timer-service.timer-datasource=java:global/jdbc/dataverse
<payara install path>/asadmin delete-jdbc-connection-pool --cascade=true dvnDbPool
<payara install path>/asadmin delete-password-alias db_password_alias
```

3. Stop payara and remove the generated directory, start.
```
service payara stop
# remove the generated directory:
rm -rf <payara install path>/payara/domains/domain1/generated
service payara start
```

3. Deploy this version.
```
<payara install path>/bin/asadmin deploy dataverse-5.2.war
```

4. Restart Payara
```
service payara stop
service payara start
```
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/admin/timers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The following JVM option instructs the application to act as the dedicated timer

``-Ddataverse.timerServer=true``

**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.
**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="java:global/jdbc/dataverse">`` 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.

**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.

Expand Down
8 changes: 3 additions & 5 deletions doc/sphinx-guides/source/admin/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,9 @@ followed by an Exception stack trace with these lines in it:

:fixedwidthplain:`Exception Description: Could not deserialize object from byte array` ...


... it most likely means that it is the JDBC driver incompatibility that's preventing the timer from working correctly.
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>`_
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).

... you should reach out by opening an issue. In the good old days of running Dataverse 4 running on Glassfish 4,
this was a hint for an unsupported JDBC driver. In Dataverse 5 this would be a new regression and it's cause
would need to be investigated.

Constraint Violations Issues
----------------------------
Expand Down
1 change: 0 additions & 1 deletion doc/sphinx-guides/source/developers/tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ Switching from Glassfish to Payara
If you already have a working dev environment with Glassfish and want to switch to Payara, you must do the following:

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

----

Expand Down
48 changes: 47 additions & 1 deletion doc/sphinx-guides/source/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,52 @@ dataverse.auth.password-reset-timeout-in-minutes

Users have 60 minutes to change their passwords by default. You can adjust this value here.

dataverse.db.user
+++++++++++++++++

The PostgreSQL user name to connect with.

Can also be set via *MicroProfile Config API* sources, e. g. environment variable ``DATAVERSE_DB_USER``.
Defaults to ``dataverse`` (via ``microprofile-config.properties``).

dataverse.db.password
+++++++++++++++++++++

The PostgreSQL users password to connect with.

Can also be set via *MicroProfile Config API* sources, e. g. environment variable ``DATAVERSE_DB_PASSWORD``.
Preferrably use a JVM alias, as passwords in environment variables aren't safe!

.. code-block:: shell

echo "AS_ADMIN_ALIASPASSWORD=change-me-super-secret" > /tmp/password.txt
asadmin create-password-alias --passwordfile /tmp/password.txt dataverse.db.password
rm /tmp/password.txt

dataverse.db.host
+++++++++++++++++

The PostgreSQL server to connect to.

Can also be set via *MicroProfile Config API* sources, e. g. environment variable ``DATAVERSE_DB_HOST``.
Defaults to ``localhost`` (via ``microprofile-config.properties``).

dataverse.db.port
+++++++++++++++++

The PostgreSQL servers port to connect to.

Can also be set via *MicroProfile Config API* sources, e. g. environment variable ``DATAVERSE_DB_PORT``.
Defaults to ``5432`` (via ``microprofile-config.properties``), the default PostgreSQL port.

dataverse.db.name
+++++++++++++++++

The PostgreSQL database name to use for Dataverse.

Can also be set via *MicroProfile Config API* sources, e. g. environment variable ``DATAVERSE_DB_NAME``.
Defaults to ``dataverse`` (via ``microprofile-config.properties``).

dataverse.rserve.host
+++++++++++++++++++++

Expand Down Expand Up @@ -1168,7 +1214,7 @@ This JVM setting is also part of **handles** configuration. The Handle.Net insta
.. _dataverse.handlenet.index:

dataverse.handlenet.index
+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++
If you want to use different index than the default 300

.. _dataverse.timerServer:
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 @@ -47,7 +47,7 @@ If you don't want to be prompted, here is an example of the non-interactive invo
Payara
------

Payara 5.2020.2 is recommended. Newer versions might work fine.
Payara 5.2020.5 is required. Newer versions might work fine. Regular updates are recommended.

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

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

# wget https://github.com/payara/Payara/releases/download/payara-server-5.2020.2/payara-5.2020.2.zip
# unzip payara-5.2020.2.zip
# wget https://github.com/payara/Payara/releases/download/payara-server-5.2020.5/payara-5.2020.5.zip
# unzip payara-5.2020.5.zip
# mv payara5 /usr/local

If you intend to install and run Payara under a service account (and we hope you do), chown -R the Payara hierarchy to root to protect it but give the service account access to the below directories:
Expand Down
9 changes: 8 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
<skipUnitTests>false</skipUnitTests>

<jakartaee-api.version>8.0.0</jakartaee-api.version>
<payara.version>5.2020.2</payara.version>
<payara.version>5.2020.5</payara.version>
<postgresql.version>42.2.12</postgresql.version>
<aws.version>1.11.762</aws.version>
<commons.logging.version>1.2</commons.logging.version>
<httpcomponents.client.version>4.5.5</httpcomponents.client.version>
Expand Down Expand Up @@ -263,6 +264,11 @@
<artifactId>jbcrypt</artifactId>
<version>0.3m</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
Expand Down Expand Up @@ -679,6 +685,7 @@
<include>**/*.xml</include>
<include>**/firstNames/*.*</include>
<include>**/*.xsl</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
Expand Down
1 change: 0 additions & 1 deletion scripts/database/homebrew/devinstall
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ export FILES_DIR=$HOME/dataverse/files
export MEM_HEAP_SIZE=2048
export GLASSFISH_DOMAIN=domain1
export GLASSFISH_ROOT=/Applications/NetBeans/glassfish4
cp pgdriver/postgresql-9.1-902.jdbc4.jar $GLASSFISH_ROOT/glassfish/lib
cp ../../conf/jhove/jhove.conf $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhove.conf
./glassfish-setup.sh
1 change: 0 additions & 1 deletion scripts/deploy/phoenix.dataverse.org/install
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ export SMTP_SERVER=localhost
export MEM_HEAP_SIZE=2048
export GLASSFISH_DOMAIN=domain1
cd scripts/installer
cp pgdriver/postgresql-8.4-703.jdbc4.jar $GLASSFISH_ROOT/glassfish/lib
cp ../../conf/jhove/jhove.conf $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhove.conf
./glassfish-setup.sh
10 changes: 2 additions & 8 deletions scripts/installer/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
INSTALLER_ZIP_DIR=dvinstall
DISTRIBUTION_WAR_FILE=${INSTALLER_ZIP_DIR}/dataverse.war
GLASSFISH_SETUP_SCRIPT=${INSTALLER_ZIP_DIR}/as-setup.sh
POSTGRES_DRIVERS=${INSTALLER_ZIP_DIR}/pgdriver
API_SCRIPTS=${INSTALLER_ZIP_DIR}/setup-datasetfields.sh ${INSTALLER_ZIP_DIR}/setup-users.sh ${INSTALLER_ZIP_DIR}/setup-builtin-roles.sh ${INSTALLER_ZIP_DIR}/setup-dvs.sh ${INSTALLER_ZIP_DIR}/data ${INSTALLER_ZIP_DIR}/setup-identity-providers.sh ${INSTALLER_ZIP_DIR}/setup-all.sh ${INSTALLER_ZIP_DIR}/post-install-api-block.sh
DB_SCRIPT=${INSTALLER_ZIP_DIR}/reference_data.sql
JHOVE_CONFIG=${INSTALLER_ZIP_DIR}/jhove.conf
Expand All @@ -16,9 +15,9 @@ installer: dvinstall.zip
clean:
/bin/rm -rf ${INSTALLER_ZIP_DIR} dvinstall.zip

dvinstall.zip: ${GLASSFISH_SETUP_SCRIPT} ${POSTGRES_DRIVERS} ${JSF_PATCH_DIR} ${DISTRIBUTION_WAR_FILE} ${API_SCRIPTS} ${DB_SCRIPT} ${JHOVE_CONFIG} ${JHOVE_SCHEMA} ${SOLR_SCHEMA} ${SOLR_CONFIG} ${PYTHON_FILES} ${INSTALL_SCRIPT}
dvinstall.zip: ${GLASSFISH_SETUP_SCRIPT} ${JSF_PATCH_DIR} ${DISTRIBUTION_WAR_FILE} ${API_SCRIPTS} ${DB_SCRIPT} ${JHOVE_CONFIG} ${JHOVE_SCHEMA} ${SOLR_SCHEMA} ${SOLR_CONFIG} ${PYTHON_FILES} ${INSTALL_SCRIPT}
@echo making installer...
zip -r dvinstall.zip ${GLASSFISH_SETUP_SCRIPT} ${POSTGRES_DRIVERS} ${JSF_PATCH_DIR} ${DISTRIBUTION_WAR_FILE} ${API_SCRIPTS} ${DB_SCRIPT} ${JHOVE_CONFIG} ${JHOVE_SCHEMA} ${SOLR_SCHEMA} ${SOLR_CONFIG} ${PYTHON_FILES} ${INSTALL_SCRIPT}
zip -r dvinstall.zip ${GLASSFISH_SETUP_SCRIPT} ${JSF_PATCH_DIR} ${DISTRIBUTION_WAR_FILE} ${API_SCRIPTS} ${DB_SCRIPT} ${JHOVE_CONFIG} ${JHOVE_SCHEMA} ${SOLR_SCHEMA} ${SOLR_CONFIG} ${PYTHON_FILES} ${INSTALL_SCRIPT}
@echo
@echo "Done!"

Expand Down Expand Up @@ -46,11 +45,6 @@ ${GLASSFISH_SETUP_SCRIPT}: as-setup.sh ${INSTALLER_ZIP_DIR}
@echo copying glassfish setup
/bin/cp as-setup.sh ${INSTALLER_ZIP_DIR}

${POSTGRES_DRIVERS}: pgdriver/postgresql-42.2.12.jar
mkdir -p ${POSTGRES_DRIVERS}
@echo copying postgres driver
/bin/cp pgdriver/postgresql-42.2.12.jar ${POSTGRES_DRIVERS}

${API_SCRIPTS}: ../api/setup-datasetfields.sh ../api/setup-users.sh ../api/setup-dvs.sh ../api/setup-identity-providers.sh ../api/setup-all.sh ../api/post-install-api-block.sh ../api/setup-builtin-roles.sh ../api/data ${INSTALLER_ZIP_DIR}
@echo copying api scripts
/bin/cp -R ../api/setup-datasetfields.sh ../api/setup-users.sh ../api/setup-dvs.sh ../api/setup-identity-providers.sh ../api/setup-all.sh ../api/post-install-api-block.sh ../api/setup-builtin-roles.sh ../api/data ${INSTALLER_ZIP_DIR}
Expand Down
1 change: 0 additions & 1 deletion scripts/installer/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ from scripts/installer (this directory):

install
glassfish-setup.sh
pgdriver (the entire directory with all its contents)

from scripts/api:

Expand Down
24 changes: 8 additions & 16 deletions scripts/installer/as-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function preliminary_setup()
./asadmin $ASADMIN_OPTS create-jvm-options "-XX\:+DisableExplicitGC"

# alias passwords
for alias in "rserve_password_alias ${RSERVE_PASS}" "doi_password_alias ${DOI_PASSWORD}" "db_password_alias ${DB_PASS}"
for alias in "rserve_password_alias ${RSERVE_PASS}" "doi_password_alias ${DOI_PASSWORD}" "dataverse.db.password ${DB_PASS}"
do
set -- $alias
echo "AS_ADMIN_ALIASPASSWORD=$2" > /tmp/$1.txt
Expand Down Expand Up @@ -150,22 +150,14 @@ function final_setup(){
./asadmin $ASADMIN_OPTS delete-jvm-options -Xmx512m
./asadmin $ASADMIN_OPTS create-jvm-options "-Xmx${MEM_HEAP_SIZE}m"

# Set up the database connection properties
./asadmin $ASADMIN_OPTS create-system-properties "dataverse.db.user=${DB_USER}"
./asadmin $ASADMIN_OPTS create-system-properties "dataverse.db.host=${DB_HOST}"
./asadmin $ASADMIN_OPTS create-system-properties "dataverse.db.port=${DB_PORT}"
./asadmin $ASADMIN_OPTS create-system-properties "dataverse.db.name=${DB_NAME}"

./asadmin $ASADMIN_OPTS create-jdbc-connection-pool --restype javax.sql.DataSource \
--datasourceclassname org.postgresql.ds.PGPoolingDataSource \
--property create=true:User=$DB_USER:PortNumber=$DB_PORT:databaseName=$DB_NAME:ServerName=$DB_HOST \
dvnDbPool

./asadmin $ASADMIN_OPTS set resources.jdbc-connection-pool.dvnDbPool.property.password='${ALIAS=db_password_alias}'

###
# Create data sources
./asadmin $ASADMIN_OPTS create-jdbc-resource --connectionpoolid dvnDbPool jdbc/VDCNetDS

###
# Set up the data source for the timers

./asadmin $ASADMIN_OPTS set configs.config.server-config.ejb-container.ejb-timer-service.timer-datasource=jdbc/VDCNetDS
# Set up the data source for the timers (using the @DataSourceDefinition from util/DataSourceProducer.java)
./asadmin $ASADMIN_OPTS set configs.config.server-config.ejb-container.ejb-timer-service.timer-datasource=java:global/jdbc/dataverse

./asadmin $ASADMIN_OPTS create-jvm-options "\-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"

Expand Down
13 changes: 0 additions & 13 deletions scripts/installer/install
Original file line number Diff line number Diff line change
Expand Up @@ -867,19 +867,6 @@ sub setup_appserver {
# with the MacOS glassfish build...). Verify, and if still the case,
# add a check.

print "\nInstalling the PostgresQL driver for Payara5... ";
# system( "/bin/cp", "pgdriver/" . $postgres_jdbc, $glassfish_dir . "/glassfish/lib" );
my $pgdriver_success = copy("pgdriver/" . $postgres_jdbc, $glassfish_dir . "/glassfish/lib" );

unless ($pgdriver_success)
{
print "\n*********************\n";
print "ERROR! Failed to copy the postgres driver into " . $glassfish_dir . "/glassfish/lib - check the directory permissions!\n";
exit 1;
}

print "done!\n";

print "\n*********************\n";
print "PLEASE NOTE, SOME OF THE ASADMIN COMMANDS ARE GOING TO FAIL,\n";
print "FOR EXAMPLE, IF A CONFIGURATION SETTING THAT WE ARE TRYING\n";
Expand Down
15 changes: 0 additions & 15 deletions scripts/installer/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,6 @@
# expected dataverse defaults
apiUrl = "http://localhost:8080/api"

# there's now a single driver that works for all supported versions:
# jodbc.postgresql.org recommends 4.2 for Java 8.
# updated drivers may be obtained from
# https://jdbc.postgresql.org/download.html
pgJdbcDriver = "postgresql-42.2.12.jar"

# 0. A few preliminary checks:
# 0a. OS flavor:

Expand Down Expand Up @@ -452,15 +446,6 @@
print("Setting App. Server heap size (Xmx) to "+str(gfHeap)+" Megabytes")
config.set('glassfish','GLASSFISH_HEAP', str(gfHeap))

# 4b1. PostgresQL driver:
pg_driver_jarpath = "pgdriver/"+pgJdbcDriver

try:
copy2(pg_driver_jarpath, gfJarPath)
print("Copied "+pgJdbcDriver+" into "+gfJarPath)
except:
print("Couldn't copy "+pgJdbcDriver+" into "+gfJarPath+". Check its permissions?")

# 4c. create payara admin credentials file

userHomeDir = pwd.getpwuid(os.getuid())[5]
Expand Down
Binary file removed scripts/installer/pgdriver/postgresql-42.2.12.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@TransactionManagement(value = TransactionManagementType.BEAN)
public class StartupFlywayMigrator {

@Resource(lookup = "jdbc/VDCNetDS")
@Resource(lookup = "java:global/jdbc/dataverse")
private DataSource dataSource;

@PostConstruct
Expand Down
Loading