# ERROR: no schema has been selected to create in

**URL:** <https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863>\
**Category:** Uncategorized\
**Created:** [October 4, 2020, 7:22pm UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863 "2020-10-04T19:22:51Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![aashi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aashi](https://forum.flowable.org/u/aashi)\
**Post date:** [October 4, 2020, 7:22pm UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/1 "2020-10-04T19:22:52Z")

</div>

Hiii All,

Following this [Spring Boot · Flowable Open Source Documentation](https://flowable.com/open-source/docs/bpmn/ch05a-Spring-Boot/#compatibility) I’ve created an app with dependency flowable-spring-boot-starter (6.4.1) & postgresql db. I’ve deployed it in cloud foundry as well and it worked fine. But somehow now the same application is not getting deployed and I’m getting below error trace, could you please tell me the issue and how to fix it?

> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘TCMController’: Unsatisfied dependency expressed through field ‘tcmImportService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘TCMImportService’: Unsatisfied dependency expressed through field ‘runtimeService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘runtimeServiceBean’ defined in class path resource [org/flowable/spring/boot/ProcessEngineServicesAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘runtimeServiceBean’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘processEngine’ defined in class path resource [org/flowable/spring/boot/ProcessEngineServicesAutoConfiguration$AlreadyInitializedAppEngineConfiguration.class]: Unsatisfied dependency expressed through method ‘processEngine’ 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: couldn’t create db schema: create table ACT\_GE\_PROPERTY (  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT NAME\_ varchar(64),  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT VALUE\_ varchar(300),  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT REV\_ integer,  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT primary key (NAME\_)  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT )  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at c.s.c.l.s.c.cas.Application.main(Application.java:11) [classes/:na]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0\_265]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0\_265]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0\_265]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0\_265]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [app/:na]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [app/:na]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [app/:na]  
> 2020-10-05T00:38:30.33+0530 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:58) [app/:na]

Regards,  
Ashmita Sinha

---

<div class="post-metadata">

**Author:** ![sukalpo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/sukalpo/32/1143_2.png) [@sukalpo](https://forum.flowable.org/u/sukalpo)\
**Post date:** [October 5, 2020, 11:12am UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/2 "2020-10-05T11:12:37Z")

</div>

It seems you are not running any DB migration script and offloading the application to create the flowable tables. Does your application have proper roles to create the tables etc.?

---

<div class="post-metadata">

**Author:** ![aashi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aashi](https://forum.flowable.org/u/aashi)\
**Post date:** [October 7, 2020, 1:33am UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/3 "2020-10-07T01:33:23Z")

</div>

@sukalpo

I’ve done basic configuration for flowable and spring boot integration, which is,

1. added `flowable-spring-boot-starter` dependency in pom.xml
2. Created bean called Datasource for flowable to use

And yes I do have proper roles to create tables. I’ve few more tables, so I’d removed config for flowable and then deployed and it worked properly. But with flowable I’m unable to deploy with the above error trace.

Regards,  
Ashmita Sinha

---

<div class="post-metadata">

**Author:** ![sukalpo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/sukalpo/32/1143_2.png) [@sukalpo](https://forum.flowable.org/u/sukalpo)\
**Post date:** [October 7, 2020, 7:16am UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/4 "2020-10-07T07:16:31Z")

</div>

@aashi - Generally we offload the db creation to a liquibase script as our application wont have the appropriate db priviledges. Why dont you try that. Create the tables separately through liquibase and then start the application.

---

<div class="post-metadata">

**Author:** ![aashi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aashi](https://forum.flowable.org/u/aashi)\
**Post date:** [October 7, 2020, 12:40pm UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/5 "2020-10-07T12:40:30Z")

</div>

@sukalpo - I’ve noticed one more thing. If the schema is already created then flowable is able to create tables during deployment. This indicates that somehow it’s not able to get which schema to work with during deployment. Any help on this?

I’ve also added below properties in application.properties file,  
flowable.database-schema=casdbschema  
flowable.database-schema-update=true

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [October 7, 2020, 2:38pm UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/6 "2020-10-07T14:38:11Z")

</div>

Hey @aashi,

Flowable is not creating the schema for you. You have to do that on your own before you start Flowable.

Cheers,  
Filip

---

<div class="post-metadata">

**Author:** ![aashi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aashi](https://forum.flowable.org/u/aashi)\
**Post date:** [October 8, 2020, 4:50am UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/7 "2020-10-08T04:50:27Z")

</div>

Hi @filiphr,

Isn’t there any way to make sure schema is created and flowable is able to create tables using liquibase scripts?

What should be the idle behaviour?

Since the application will be deployed in cloud foundry, I can’t make sure every time that the schema or tables are already created.

Regards,  
Ashmita Sinha

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [October 8, 2020, 8:04am UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/8 "2020-10-08T08:04:58Z")

</div>

Hey @aashi,

The tables are created automatically created. If you need a custom schema then you’ll have to do it on your own. Flowable does not create the schema.

Cheers,  
Filip

---

<div class="post-metadata">

**Author:** ![aashi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aashi](https://forum.flowable.org/u/aashi)\
**Post date:** [October 8, 2020, 9:08am UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/9 "2020-10-08T09:08:50Z")

</div>

Hi,

I’m already creating my custom db schema but flowable is unable to pick it while deployment. And this is happening only when schema was not already created in previous deployment, otherwise it’s working fine.

If there’s no other way then I need to consider creating tables before deployment only.

Regards,  
Ashmita Sinha

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [October 12, 2020, 7:29am UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/10 "2020-10-12T07:29:29Z")

</div>

Hey @aashi,

If the schema is there before the deployment and it is working then it seems that your steps during the deployment are not OK. Otherwise if the schema is created before Flowable runs then it will work correctly.

How are you creating the custom db schema? Are you doing it as part of your application?

Cheers,  
Filip

---

<div class="post-metadata">

**Author:** ![aashi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aashi](https://forum.flowable.org/u/aashi)\
**Post date:** [October 13, 2020, 6:01pm UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/11 "2020-10-13T18:01:50Z")

</div>

Hey @filiphr,

Initially, first, it checks whether the schema is created or not, if not, then the schema is created. And I could see in the logs that schema is getting created before flowable tries to create db tables. Is there any configuration through which I can specify that flowable has to start creating db tables once schema is created properly?

So far, I’m aware of the below properties which needs to be placed in application.properties file. But it doesn’t seems to be working,

```
flowable.database-schema=casdbschema
flowable.database-schema-update=true

```

Regards,  
Ashmita

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [October 14, 2020, 6:11am UTC](https://forum.flowable.org/t/error-no-schema-has-been-selected-to-create-in/6863/12 "2020-10-14T06:11:26Z")

</div>

Hey @aashi,

We would need an example of what you are saying. What you are saying should work without problems, Flowable doesn’t check whether the schema exists or not it just uses it. When using Spring Boot it will also use the DataSource configured by Spring Boot to do all the DB connections.

Cheers,  
Filip
