Skip to content

Troubleshooting & Administration

Michael Morris-Pearce edited this page Apr 27, 2018 · 9 revisions

Contents

How do I build and run ILL Reports for local development?

First, you should build the project the project with Maven.

mvn install or Clean and Build in NetBeans. Unit tests should pass. This will build an executable JAR file that includes an embedded Tomcat server.

You can run the application with java -Dserver.port=PORT_NUMBER -jar JAR_PATH or Run in NetBeans. NetBeans will prompt you to select a main class. Choose Application.java.

The application will not deploy successfully on run until you do a few more things:

  1. Setup the JDBC properties to connect to Amazon RDS.
  2. Setup a trust store containing the RDS certificate(s).
  3. Setup a key store for SSL.

Then you should be able to use the application in your browser, visiting https://localhost:18443/.

How do I connect to the MySQL Data Warehouse?

You must define a properties file jreport-jdbc.properties in the working directory.

  • jreport.jdbc.url The JDBC URL of the database.
  • jreport.jdbc.username The database login.
  • jreport.jdbc.password The databaes password.

You will also need to configure SSL. See I receive an SSL error message when I try to deploy the application.

How do I configure JAVA_OPTS in Spring Boot?

(a) Create a file ill-reports.conf in the same directory as the executable JAR. By default, Spring Boot will look for the filename that matches the target JAR filename. See the docs.

JAVA_OPTS="-Dserver.port=18443 -Dserver.insecure-redirect-port=443"
MODE=service
PID_FOLDER=/path/to/pid
LOG_FOLDER=/path/to/logs

(b) In Netbeans, set the -D... arguments in Project > Run > Arguments.

I receive an SSL error message when I try to deploy the application.

Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

You need your trust store to contain the SSL certificate for the MySQL database you are connecting to. If you're trying to run the application locally, you can copy the trust store from the dev server.

Configure the trust store through JAVA_OPTS in ill-reports.conf:

JAVA_OPTS="-Djavax.net.ssl.trustStore=/path/to/truststore.jks -Djavax.net.ssl.trustStorePassword=password -Djavax.net.ssl.trustStoreType=jks"

I receive a different SSL error.

ILL Reports tries to load a ssl.properties file with information about a key store from the working directory. This key store allows the application server to present a certificate to web browsers.

server.ssl.enabled=true
server.ssl.key-store=/path/to/keystore/file
server.ssl.key-store-password=password
server.ssl.key-store-alias=alias

Again, you can copy this from the dev server for local configuration, but the certificate will not match your local domain name. You can add a security exception in your browser and get on with your life, or you can add a self-signed certificate in your key store.