title: Schema-validation: missing sequence [user_sequence]
body: <p><strong>Error :</strong>
  <br/></p>
  <pre><code>INFO   | jvm 1    | 2020/10/17 23:35:09 | Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3e614191': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in file [C:\Program Files\Micro Focus\Operations Orchestration\central\tomcat\temp\0-oo\WEB-INF\classes\META-INF\spring\datamodelContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing sequence [user_sequence]
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:634)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:448)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1181)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1075)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:299)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   ... 167 more
  INFO   | jvm 1    | 2020/10/17 23:35:09 | Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in file [C:\Program Files\Micro Focus\Operations Orchestration\central\tomcat\temp\0-oo\WEB-INF\classes\META-INF\spring\datamodelContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing sequence [user_sequence]
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1634)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   ... 175 more
  INFO   | jvm 1    | 2020/10/17 23:35:09 | Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing sequence [user_sequence]
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:396)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:371)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:336)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1692)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1630)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   ... 182 more
  INFO   | jvm 1    | 2020/10/17 23:35:09 | Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing sequence [user_sequence]
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.hibernate.tool.schema.internal.AbstractSchemaValidator.validateSequence(AbstractSchemaValidator.java:184)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.hibernate.tool.schema.internal.AbstractSchemaValidator.performValidation(AbstractSchemaValidator.java:100)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.hibernate.tool.schema.internal.AbstractSchemaValidator.doValidation(AbstractSchemaValidator.java:68)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:191)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:312)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:892)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:151)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:360)
  INFO   | jvm 1    | 2020/10/17 23:35:09 |   at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:384)
  </code></pre>
  <p>INFO   | jvm 1    | 2020/10/17 23:35:09 |   ... 186 more
  <br/>
  <br/>
  <strong>Entity Code</strong></p>
  <pre><code>@Id
      @GeneratedValue(strategy = GenerationType.AUTO,generator = &quot;sequence-generator&quot;)
      @GenericGenerator(
              name = &quot;sequence-generator&quot;,
              strategy = &quot;org.hibernate.id.enhanced.SequenceStyleGenerator&quot;,
              parameters = {@Parameter(name = &quot;sequence_name&quot;, value = &quot;user_sequence&quot;)}
      )
      @Column(name = &quot;ID&quot;)
      private Long id;
  </code></pre>
  <br/>
  <br/>
  I am stuck here for past 1 days . When I tried to create auto generate it ois giving me error like missing sequence[hibernate_sequence]. So, I generate my own sequence like shown above in **Entity code** part, but I am getting errors again with my custom sequence. I don't know what to do next .