title: How to fix org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement expected "identifier"
body: <p>I am using H2 in-memory database for my springboot application. Where I have enabled <code>hibernate.ddl-auto</code>. I am getting below exception while hibernate is creating a schema</p>
  <pre><code>Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException:
  Syntax error in SQL statement &quot;CREATE TABLE PRODUCT_OFFSET_INFO (ID BIGINT NOT NULL, MODIFIED_TIMESTAMP TIMESTAMP, OFFSET[*] BIGINT, TOPIC_NAME VARCHAR(255), PRIMARY KEY (ID))&quot;; expected &quot;identifier&quot;; SQL statement:
  create table PRODUCT_OFFSET_INFO (ID bigint not null, MODIFIED_TIMESTAMP timestamp, OFFSET bigint, TOPIC_NAME varchar(255), primary key (ID)) [42001-200]
  '''
  </code></pre>
  <p>Below is the Entity class:</p>
  <pre class="lang-java prettyprint-override"><code>@Entity
  @Table(name=&quot;PRODUCT_OFFSET_INFO&quot;)
  public class ProductOffsetInfo implements Serializable
  {
     private static final long serialVersionUID = -2147468513335906679L;
      
     @Id
     @Column(name=&quot;ID&quot;)
     private Long ProductId;
      
     @Column(name=&quot;TOPIC_NAME&quot;)
     private String topic_name;
      
     @Column(name=&quot;OFFSET&quot;)
     private Long offset;
      
     @Column(name = &quot;MODIFIED_TIMESTAMP&quot;)
     private Date modified;
      
     public Long getProductId() {
         return ProductId;
     }
     public void setProductId(Long ProductId) {
         this.ProductId = ProductId;
     }
      
     public String getTopic_name() {
         return topic_name;
     }
     public void setTopic_name(String topic_name) {
         this.topic_name = topic_name;
     }
      
     public Long getOffset() {
         return offset;
     }
     public void setOffset(Long offset) {
         this.offset = offset;
     }
      
     public Date getModified() {
         return modified;
     }
      
     public void setModified(Date modified) {
         this.modified = modified;
     }
  }
  </code></pre>
  <p>Below is the database config file:</p>
  <pre class="lang-java prettyprint-override"><code>@Configuration
  @EnableTransactionManagement
  @EnableJpaRepositories(
      entityManagerFactoryRef = &quot;productEntityManagerFactory&quot;,
      transactionManagerRef = &quot;productTransactionManager&quot;,
      basePackages = {&quot;com.product.repository.product&quot;}
  )
  @ComponentScan({&quot;com.product.repository.product.impl&quot;})
  @EntityScan({&quot;com.product.commons.entities.product.models&quot;,&quot;com.product.models.product&quot;})
  public class ProductDbConfig {
  
          @Autowired
          private JpaProperties jpaProperties;
          @Primary
          @Bean(&quot;productHikariConfig&quot;)
          @ConfigurationProperties(prefix = &quot;spring.datasource&quot;)
          public HikariConfig hikariConfig() {
              return new HikariConfig();
          }
      
          @Primary
          @Bean(name = &quot;productDataSource&quot;)
          @DependsOn(&quot;productHikariConfig&quot;)
          public DataSource dataSource(@Qualifier(&quot;productHikariConfig&quot;) HikariConfig hikariConfig) {
              return new HikariDataSource(hikariConfig);
          }
      
          @Primary
          @Bean(name = &quot;productEntityManagerFactory&quot;)
          @PersistenceContext(unitName = &quot;product&quot;)
          public LocalContainerEntityManagerFactoryBean entityManagerFactory(
                  EntityManagerFactoryBuilder builder, @Qualifier(&quot;productDataSource&quot;) DataSource datasource) {
              return builder
                      .dataSource(datasource).properties(jpaProperties.getProperties())
                      .packages(&quot;com.product.commons.entities.product.models&quot;,&quot;com.product.models.product&quot;)
                      .persistenceUnit(&quot;product&quot;)
                      .build();
          }
      
          @Primary
          @Bean(name = &quot;productTransactionManager&quot;)
          public PlatformTransactionManager transactionManager(
                  @Qualifier(&quot;productEntityManagerFactory&quot;) EntityManagerFactory entityManagerFactory) {
              return new JpaTransactionManager(entityManagerFactory);
          }
      }
  </code></pre>
  <p>Below is the <code>application.yml</code> content for DB</p>
  <pre><code>    spring:
        profiles: mock
        jpa:
          database-platform: org.hibernate.dialect.H2Dialect
          generate-ddl: true
          hibernate:
            ddl-auto: create
        datasource:
          jdbcUrl: jdbc:h2:mem:PRODUCT
          driver-class-name: org.h2.Driver
          maximumPoolSize: 10
          minimumIdle: 5
          idleTimeout: 60000
          maxLifetime: 120000
          leakDetectionThreshold: 180000
          poolName: &quot;product&quot;
  
  </code></pre>