title: Getting org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111 using com.vladmihalcea:hibernate-types-5
body: <p>I'm attempting to use this library for persisting JSON with JPA &amp; Hibernate:  </p>
  
  <p><a href="https://github.com/vladmihalcea/hibernate-types" rel="nofollow noreferrer">https://github.com/vladmihalcea/hibernate-types</a></p>
  
  <p>I am following (in every meaningful detail) the examples from this article:</p>
  
  <p><a href="https://vladmihalcea.com/how-to-store-schema-less-eav-entity-attribute-value-data-using-json-and-hibernate/" rel="nofollow noreferrer">https://vladmihalcea.com/how-to-store-schema-less-eav-entity-attribute-value-data-using-json-and-hibernate/</a></p>
  
  <p>Here is my (Gradle) dependency:</p>
  
  <pre><code>compile 'com.vladmihalcea:hibernate-types-5:2.2.2'
  </code></pre>
  
  <p>And here is the source of my entity class:</p>
  
  <pre><code>package org.apereo.portal.fbms.data;
  
  import com.fasterxml.jackson.databind.JsonNode;
  import com.vladmihalcea.hibernate.type.json.JsonStringType;
  import org.hibernate.annotations.Type;
  import org.hibernate.annotations.TypeDef;
  
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.Id;
  import javax.persistence.Table;
  
  @Entity
  @Table(name = "FBMS_FORM")
  @TypeDef(
          name = "json",
          typeClass = JsonStringType.class
  )
  public class FormEntity {
  
      @Id
      @GeneratedValue
      private Long id;
  
      @Column(name = "FNAME", nullable = false, unique = true)
      private String fname; // TODO:  Regex-based validator
  
      @Column(name = "VERSION", nullable = false)
      private int version;
  
      @Column(name = "SCHEMA", nullable = false)
      @Type(type = "json")
      private JsonNode schema;
  
      @Column(name = "METADATA")
      @Type(type = "json")
      private JsonNode metadata;
  
      public Long getId() {
          return id;
      }
  
      // Additional getters and setters omitted for brevity...
  
  }
  </code></pre>
  
  <p>I am getting this exception:</p>
  
  <pre><code>Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111
          at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-4.3.16.RELEASE.jar:4.3.16.RELEASE]
          at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:371) ~[spring-orm-4.3.16.RELEASE.jar:4.3.16.RELEASE]
          at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:336) ~[spring-orm-4.3.16.RELEASE.jar:4.3.16.RELEASE]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1688) ~[spring-beans-4.3.16.RELEASE.jar:4.3.16.RELEASE]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1626) ~[spring-beans-4.3.16.RELEASE.jar:4.3.16.RELEASE]
          ... 16 common frames omitted
  Caused by: org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111
          at org.hibernate.dialect.TypeNames.get(TypeNames.java:70) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.dialect.TypeNames.get(TypeNames.java:101) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:341) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.mapping.Column.getSqlType(Column.java:231) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.mapping.Table.sqlAlterStrings(Table.java:464) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.tool.schema.internal.SchemaMigratorImpl.migrateTable(SchemaMigratorImpl.java:254) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigrationToTargets(SchemaMigratorImpl.java:170) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:60) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:134) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:101) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:472) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
          at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60) ~[spring-orm-4.3.16.RELEASE.jar:4.3.16.RELEASE]
          at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:360) ~[spring-orm-4.3.16.RELEASE.jar:4.3.16.RELEASE]
          at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:384) ~[spring-orm-4.3.16.RELEASE.jar:4.3.16.RELEASE]
          ... 20 common frames omitted
  </code></pre>
  
  <p>In case it's helpful...</p>
  
  <ul>
  <li>I haven't included info on RDBMS platform or JDBC driver;  that's intentional -- the solution needs to be database platform-independent.</li>
  <li>I will be using spring-data-jpa with this entity.</li>
  </ul>