title: The increment size of the sequence is set to [50] in the entity mapping while the associated database sequence increment size is 1
body: <p>I'm trying to configure the properties for postgreSQL Database in my first sprinboot application. But when I run this application I am getting the following error:</p>
  
  <pre><code>org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Unsatisfied dependency expressed through method 'requestMappingHandlerAdapter' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcConversionService' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeRepository' defined in com.jrp.pma.dao.EmployeeRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not instantiate id generator [entity-name=com.jrp.pma.entities.Project]
  Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeRepository' defined in com.jrp.pma.dao.EmployeeRepository defined in 
      ... 39 common frames omitted
  
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeRepository' defined in com.jrp.pma.dao.EmployeeRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not instantiate id generator [entity-name=com.jrp.pma.entities.Project]
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not instantiate id generator [entity-name=com.jrp.pma.entities.Project]
      at 
  Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not instantiate id generator [entity-name=com.jrp.pma.entities.Project]
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:403) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_201]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_201]
  Caused by: org.hibernate.MappingException: The increment size of the [project_seq] sequence is set to [50] in the entity mapping while the associated database sequence increment size is [1].
      at 
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available
      at 
  </code></pre>
  
  <p>PostgreSQL properties:</p>
  
  <pre><code>spring.datasource.url=jdbc:postgresql://localhost:5432/pma-springbootdb
  spring.datasource.username=***
  spring.datasource.password=***
  spring.datasource.initialization-mode=never
  spring.jpa.hibernate.ddl-auto=none
  spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
  spring.jpa.show-sql=true
  spring.thymeleaf.cache=false
  </code></pre>
  
  <p>version=3.0.0</p>
  
  <p>SQL Query:</p>
  
  <pre class="lang-sql prettyprint-override"><code>CREATE SEQUENCE IF NOT EXISTS employee_seq;
  
  CREATE TABLE IF NOT EXISTS employee (
     employee_id BIGINT NOT NULL DEFAULT nextval('employee_seq') PRIMARY KEY,
     email VARCHAR(100) NOT NULL,
     first_name VARCHAR(100) NOT NULL,
     last_name VARCHAR(100) NOT NULL
  );
  
  CREATE SEQUENCE IF NOT EXISTS project_seq;
  
  CREATE TABLE IF NOT EXISTS project (
     project_id BIGINT NOT NULL DEFAULT nextval('project_seq') PRIMARY KEY,
     name VARCHAR(100) NOT NULL,
     stage VARCHAR(100) NOT NULL,
     description VARCHAR(500) NOT NULL
  );
  
  CREATE TABLE IF NOT EXISTS project_employee (
     project_id BIGINT REFERENCES project, 
     employee_id BIGINT REFERENCES employee
  );
  </code></pre>
  
  <p>Project.java</p>
  
  <pre class="lang-java prettyprint-override"><code>@Entity
  public class Project {
  
     @Id
     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "project_seq")
     private Long projectId;
     ....
     ....
  }
  </code></pre>
  
  <p>Employee.java:</p>
  
  <pre class="lang-java prettyprint-override"><code>@Entity
  public class Employee {
     @Id
     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "employee_seq")
     private long employeeId;
     ...
     ..
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/RxOkE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RxOkE.png" alt="PostgreSQL Database Strucutre"></a>
  <a href="https://i.stack.imgur.com/sOxuo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sOxuo.png" alt="port"></a></p>