I have created flowable-ui-app.properties file in the lib folder of Tomcat with properties
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/flowable_test?characterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=root
and have put the mysql connector jar too.
but it is till pointing to h2 don knw why?
I have deployed admin and idm war to tomcat webapps folder.
Your file is being picked up. However, it has a different order and the application.properties one is overriding your own configuration. So if you just rename the flowable-ui.app.properties to application.properties it would work like before (this would also be the way of doing it in the future). See also issue #961
More advanced way of working with Spring Boot
This part is about a more advanced way of achieving this with Spring Boot.
By default Spring would pick up files (named application.properties) from:
file:./config/
file:./
classpath:/config/
classpath:/
The last 2 are not relevant as they are on the classpath. However, the first 2 are the locations which are. With . means the folder from which you are starting the tomcat. Not sure how you are doing this. In any case you can set the spring.config.additional-location property as a environment property or a system property to a value of your own choosing.
In order to do that you would need to change your setenv.sh from the tomcat bin folder (or add one if it does not exist) and add:
You would then need to place your configuration properties in the flowable-config directory. The property file should then be named application.properties. Spring Boot will pick app all files that are ending on .properties or .yml.
Note: In case you decide to change spring.config.name then the defaults set in the application.properties in the application will not work and you will have to apply them.
@filiphr Thanks a lot it solved my problem I have one more question regarding how to use my spring boot project with flowable admin . Issue is like i have created a spring project in it i have my flowable.cfg.xml which read the datasource from applicationContext.xml and contains the spring.ProcessEngineConfigration. My project contains
process definition which has a start event as a timer event i want to deploy this process and want to use flowable admin to monitor it how can we do this. Please help.
2018-04-05 16:42:27.553 INFO 6588 --- [ main] o.s.c.a.ConfigurationClassParser : Properties location [classpath:/META-INF/flowable-ui-app/flowable-ui-app.properties] not resolvable: class path resource [META-INF/flowable-ui-app/flowable-ui-app.properties] cannot be opened because it does not exist
2018-04-05 16:42:27.555 INFO 6588 --- [ main] o.s.c.a.ConfigurationClassParser : Properties location [classpath:flowable-ui-app.properties] not resolvable: class path resource [flowable-ui-app.properties] cannot be opened because it does not exist
2018-04-05 16:42:27.558 INFO 6588 --- [ main] o.s.c.a.ConfigurationClassParser : Properties location [file:flowable-ui-app.properties] not resolvable: flowable-ui-app.properties (The system cannot find the file specified)
2018-04-05 16:42:39.313 INFO 6588 â [ main] o.f.a.c.DatabaseConfiguration : database product name: âH2â
2018-04-05 16:42:39.313 INFO 6588 â [ main] o.f.a.c.DatabaseConfiguration : using database type: h2
@Tarekajaj can you share what the /actuator/env endpoint is displaying for each of the apps? Please check the file before sending it to us in case it contains some sensitive information.
In your properties. Please check those properties in the flowable-modeler application as well as the log output you posted is coming from that one. Although if you run them in the same Tomcat I doubt that it would be different. The best way to check which properties you are running would be to check that endpoint. Or /actuator/configprops and search for the datasource properties.
actually, this is because I commented the datasource configuration in \flowable-admin\WEB-INF\classes\application.properties for it to work,
let me revert all the changes and try again.
Uncommented the h2 datasource inside \flowable-admin\WEB-INF\classes\application.properties
and I have the mysql configuration in tomcat\lib\application.properties
this is the result of /actuator/env
Try and put your application.properties in lib/config/ folder instead. That would have precedence on our default application properties and it should work (I think )
i am on ubuntu, for me its not working. i tried all the suggestions given here (copied application.properties file to usr/share/tomcat/lib/ as well as var/lib/tomcat8/lib/config).
any suggestions please.
Hi there.
Iâm just trying out 6.4.1.
I was able to use mariadb in 6.2.1 and practically copying my seytup on that server to the new one.
I renamed the flowable-ui-app.properties to application.properties and dropped it into tomcat/lib then configured the db properties as such:
However I am getting the following error: Error creating bean with name âidmEngineâ: FactoryBean threw exception on object creation; nested exception is org.flowable.common.engine.api.FlowableException: couldnât deduct database type from database product name 'MariaDBâ
Nothing was done in the code but it appears that MariaDB changed the behavior of the getDatabaseProductName().
[[CONJ-654](https://jira.mariadb.org/browse/CONJ-654)] change metadata behaviour: DatabaseMetaData.getDatabaseProductName() nows return "MariaDB"/"MySQL" according to server. This can cause some incompatibilities with some libraries and products that do not yet know Database Type "MariaDB"
Based on your message it is now returning âMariaDBâ that value is not in the lookup table (see lines 298 -327 of that same file linked above).
You can test it out yourself if you wanted to by adding another setProperty() that mapped âMariaDBâ to the DATABASE_TYPE_MYSQL; recompile, jar, and deploy.
I actually saw that in a changelog a while back (donât remember when) but had forgotten.
For those of you who run into this issue simply specify the useMysqlMetadata property in the datasource url as mentioned in that JIRA (spring.datasource.url=jdbc:mariadb://127.0.0.1:3306/flowable?useMysqlMetadata=true&characterEncoding=UTF-8) and that resolves the issue.
thank you @dbmalkovsky