flowable / flowable-engine

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.
https://www.flowable.org
Apache License 2.0
7.81k stars 2.59k forks source link

flowable-idm - error while running the app as standalone application with database driver #2554

Closed essepuig closed 2 years ago

essepuig commented 4 years ago

Describe the bug

I have tried to run the "flowable-idm" application as an standalone spring boot as described in the documentation (https://flowable.com/open-source/docs/bpmn/ch14-Applications/#flowable-ui-applications-installation). It works fine when no external driver is needed, but when running the application with the "-Dloader.path" option in order to load my database driver, an exception is thrown : Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver

The error seams related to the fact that the "flowable-idm" war does not use the PropertiesLauncher (as stated in the flowable documentation) and it uses instead the WarLauncher, making the "loader.path" spring boot property useless

Expected behavior The "flowable-idm" war should be able to run with an external library, or the flowable documentation should be updated in order to clarify the behavior

Additional context Flowable version : 6.4 / 6.5 Database driver : postresql

Note that this bug was already reported (https://github.com/flowable/flowable-engine/issues/1394) but the documentation has not been fixed since then

Robinyo commented 4 years ago

Hi @essepuig

I have encountered the same error so I updated the wars as follows:

# mv postgresql-42.2.14.jar WEB-INF/lib

jar uf0 flowable-admin.war WEB-INF/lib/postgresql-42.2.14.jar
jar uf0 flowable-idm.war WEB-INF/lib/postgresql-42.2.14.jar
jar uf0 flowable-modeler.war WEB-INF/lib/postgresql-42.2.14.jar
jar uf0 flowable-task.war WEB-INF/lib/postgresql-42.2.14.jar

Ref: Working with Flowable

tijsrademakers commented 2 years ago

The apps have changed into a single UI app, therefore closing the issue.