Fails to find Postgres Driver when launching as SpringBoot app

I am trying to run the stock WARs as SpringBoot applications connecting to Postgres according to the documentation: https://www.flowable.org/docs/userguide/index.html#flowableUIApps

I am using command line:
java -Dloader.path=$FLOWABLE_HOME/libs -jar $FLOWABLE_HOME/wars/flowable-idm.war /
-Dspring.config.location=$FLOWABLE_HOME/application.properties

$FLOWABLE_HOME=~/DevelopmentTools/flowable-6.4.0/wars
postgresql-42.2.5.jar is in the libs folder

SpringBoot fails with:
Cannot load driver class: org.postgresql.Driver

Tried multiple combinations without luck. Will keep trying but anyone who has this running as advertised please help.

Looks like a reported issue:

Hey @temecom,

Unfortunately when using the an executable war you can’t use loader.path from Spring Boot. In order to make it work you have 2 options:

  • Use a tomcat (or another application server) and put the postgres jdbc driver of those libs
  • Patch the flowable-idm.war to include the postgres driver

Cheers,
Filip

1 Like