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

6819 jdbc driver war #7420

Merged
merged 5 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

<jakartaee-api.version>8.0.0</jakartaee-api.version>
<payara.version>5.2020.6</payara.version>
<postgresql.version>42.2.18</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
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
JHOVE_CONFIG=${INSTALLER_ZIP_DIR}/jhove.conf
JHOVE_SCHEMA=${INSTALLER_ZIP_DIR}/jhoveConfig.xsd
Expand All @@ -15,9 +14,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} ${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} ${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} ${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} ${JHOVE_CONFIG} ${JHOVE_SCHEMA} ${SOLR_SCHEMA} ${SOLR_CONFIG} ${PYTHON_FILES} ${INSTALL_SCRIPT}
@echo
@echo "Done!"

Expand Down Expand Up @@ -45,11 +44,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
13 changes: 0 additions & 13 deletions scripts/installer/install
Original file line number Diff line number Diff line change
Expand Up @@ -840,19 +840,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 @@ -441,15 +435,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.