This new (as of v.4.6) section of the Admin guide is for tips on how to diagnose and fix system problems.
Sometimes the Dataverse application fails to deploy, or Glassfish fails to restart once the application is deployed, with the following error message: “remote failure: Error occurred during deployment: Exception while loading the app : EJB Timer Service is not available. Please see server.log for more details.”
We don’t know what’s causing this issue, but here’s a known workaround:
generated
and osgi-cache
directories;EJB__TIMER__TBL
table in the database;The shell script below performs the steps above.
Note that it may or may not work on your system, so it is provided as an example only, downloadable here
. Aside from the configuration values that need to be changed to reflect your environment (the Glassfish 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)
#!/bin/sh
# EBJ timers sometimes cause problems; utility to clear generated directories and database rows
# assumes this script is being run as root, and that the postgres user had passwordless
# access to the database (local sockets, or appropriate environmental variables).
# will restart glassfish if it's stopped; comment out the `start-domain` command at the end
# if you'd like to avoid that.
# directory where glassfish is installed
GLASSFISH_DIR=/usr/local/glassfish4
# directory within glassfish (defaults)
DV_DIR=${GLASSFISH_DIR}/glassfish/domains/domain1
# name of dataverse database
DV_DB=dvndb
# OS user for the database
DB_USER=postgres
# stop the glassfish domain (generates a warning if glassfish is stopped)
${GLASSFISH_DIR}/bin/asadmin stop-domain
rm -rf ${GLASSFISH_DIR}/${DV_DIR}/generated/
rm -rf ${GLASSFISH_DIR}/${DV_DIR}/osgi-cache/felix
sudo -u ${DB_USER} psql ${DV_DB} -c 'delete from "EJB__TIMER__TBL"';
# restart the domain (also generates a warning if glassfish is stopped)
${GLASSFISH_DIR}/bin/asadmin start-domain