I am new to Flowable and BPMN. I could set up properly flowable-ui and flowable-rest with the by-default configuration using Apache Tomcat.
My aim is to be able to use flowable-ui to design my processes and apps, and then to interact with them using the REST-API. To achieve this, I would like to make the webapps (in tomcat) “flowable-ui” and “flowable-rest” point to the same mysql database that I created and called “flowable”.
I also created a mysql user named flowable with password flowable as required in the doc.
Then, I tried to link flowable-ui to this mysql db, then if it worked, I would have done the same with flowable-rest.
To do this, I changed the following lines in tomcat/webapps/flowable-ui/WEB-INF/classes/flowable-default.properties as indicated in the doc that I studied:
EDIT:
My bad, you don’t have a standalone Spring Boot application, you would rather override the properties for the default database connection of the Flowable instance.
I use Docker, and here’s how I did it there:
SPRING_DATASOURCE_DRIVER-CLASS-NAME: org.postgresql.Driver
SPRING_DATASOURCE_URL: jdbc:postgresql://flowable-postgres:5432/flowable
SPRING_DATASOURCE_USERNAME: flowable
SPRING_DATASOURCE_PASSWORD: flowable
So the properties you’re overriding are correct, however it might be at a “wrong location” in the file system.
Thank you for your answer. Indeed, I intentionnally do not use Docker. I cannot make this work, as I have read all similar topics on this forum and documentation sections related to my topic. As you, I think it might be a tiny mistake, but I have no clue how to find it.
try to put a application.properties file containing the datasource properties in the tomcat/lib folder.
This prevents issues with overwriting while expanding the current one.
It also has a higher class loading hierarchy.
Thank you a lot for your suggestion. Actually, I read this potential fix in a similar topic, but it does not change the 404 output (I obviously stopped and restarted the apache tomcat to apply the changes).
Yes, here are what I think the relevant parts of the log:
Caused by: java.sql.SQLSyntaxErrorException: Access denied for user ‘flowable’@‘localhost’ to database ‘flowable’
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
…
Caused by: java.lang.RuntimeException: Exception while initializing Database connection
I think I should try to give rights to this user, but since I already have granted all privileges to it, I must think about it.
I flushed the privileges to update the rights, but still no luck. There is another error appearing in the log though, that states that a bean could not be built. However, unfortunately, I cannot spend more time trying to debug this. Thank you for your time !
So, it still does not work and here are the detailed useful log portions of catalina (in my opinion):
SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/home/charline/Downloads/apache-tomcat-9.0.44/webapps/flowable-ui.war] java.lang.IllegalStateException: Error starting child [...] Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/flowable-ui]] [...] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'idmSecurityConfiguration': Unsatisfied dependency expressed through field 'identityService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'idmIdentityService' defined in class path resource [org/flowable/spring/boot/idm/IdmEngineServicesAutoConfiguration.class]: Unsatisfied dependency expressed through method 'idmIdentityService' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'idmEngine' defined in class path resource [org/flowable/spring/boot/idm/IdmEngineServicesAutoConfiguration$AlreadyInitializedAppEngineConfiguration.class]: Unsatisfied dependency expressed through method 'idmEngine' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowableAppEngine': FactoryBean threw exception on object creation; nested exception is org.flowable.common.engine.api.FlowableException: Error initialising eventregistry data model [...] Caused by: org.flowable.common.engine.api.FlowableException: Error updating eventregistry engine tables [...] Caused by: java.lang.ClassCastException: class java.time.LocalDateTime cannot be cast to class java.lang.String (java.time.LocalDateTime and java.lang.String are in module java.base of loader 'bootstrap')
I think the relevant part are Error initialising eventregistry data model and Error updating eventregistry engine tables. No other log portion evokes something about mysql or more generally, database-related.
Hello,
Thank you for your quick answer. I did not do anything manually other than change the db properties as stated in the first message of this thread and create a flowable db, and a flowable user db on mysql. I did not use any db script.
Should I instanciate the db scheme, if yes how ? With which scripts ?