title: Mapping MySQL json column into JPA throws error
body: <p>I want to map MySQL JSON column into JPA. I did some research and I used </p>
  
  <pre><code>@Type( type = "json" )
  @Column( columnDefinition = "json" )
  </code></pre>
  
  <p>But this throws an exception</p>
  
  <pre><code>Exception in thread "main" org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [json]
      at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:348)
      at org.hibernate.boot.internal.ClassLoaderAccessImpl.classForName(ClassLoaderAccessImpl.java:62)
      at org.hibernate.cfg.annotations.SimpleValueBinder.fillSimpleValue(SimpleValueBinder.java:538)
      at org.hibernate.cfg.SetSimpleValueTypeSecondPass.doSecondPass(SetSimpleValueTypeSecondPass.java:25)
      at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1621)
      at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1579)
      at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:278)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:858)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:885)
      at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39)
      at com.savemonk.ce.utility.hibernateAndJPA.JPAUtility.getEntityManagerFactory(JPAUtility.java:12)
      at com.savemonk.ce.v2.pricegraph.manager.AddNewPriceTrackRecord.addNewPriceTrackRecordTest(AddNewPriceTrackRecord.java:29)
      at com.savemonk.ce.v2.pricegraph.manager.AddNewPriceTrackRecord.main(AddNewPriceTrackRecord.java:23)
  Caused by: java.lang.ClassNotFoundException: Could not load requested class : json
      at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:336)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:348)
      at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:345)
      ... 14 more
  </code></pre>
  
  <p>I understand that @Type is hibernate's org.hibernate.annotations.Type
  What is the correct way to map the column in JPA?</p>
  
  <p>I can post entity class if required.
  Any links and resources which explain about JPA + JSON-type-column would help a lot.</p>