-
Notifications
You must be signed in to change notification settings - Fork 1
Troubleshooting & Administration
- How do I build and run ILL Reports for local development?
- How do I connect to the MySQL Data Warehouse?
- How do I configure JAVA_OPTS in Spring Boot?
- I receive an SSL error message when I try to deploy the application.
- I receive a different SSL error.
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:
- Setup the JDBC properties to connect to Amazon RDS.
- Setup a trust store containing the RDS certificate(s).
- Setup a key store for SSL.
Then you should be able to use the application in your browser, visiting https://localhost:18443/.
You must define a properties file jreport-jdbc.properties in the working directory.
-
jreport.jdbc.urlThe JDBC URL of the database. -
jreport.jdbc.usernameThe database login. -
jreport.jdbc.passwordThe databaes password.
You will also need to configure SSL. See I receive an SSL error message when I try to deploy the application.
(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.
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"
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.