javax.persistence.PersistenceException: [PersistenceUnit: persistenceUnitName] Unable to build Hibernate SessionFactory

Stack Overflow | Sayan Pal | 4 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd . Or join the community to write better ones.
  1. 0

    Table per class configuration with Hibernate OGM and MongoDb is not working

    Stack Overflow | 4 months ago | Sayan Pal
    javax.persistence.PersistenceException: [PersistenceUnit: persistenceUnitName] Unable to build Hibernate SessionFactory
  2. 0
    samebug tip
    I was using the library hibernate-entitymanager:4.3.5.Final with java persistence API 2.0 instead of using it with hibernate-entitymanager:4.2.8.Final.
  3. 0
    samebug tip
    Since:Java Persistence 2.1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    "Not known whether passed class name ... is safe" using JPA EmbeddedId with Hibernate

    Stack Overflow | 2 years ago | Joshua Taylor
    javax.persistence.PersistenceException: [PersistenceUnit: unit] Unable to build Hibernate SessionFactory
  6. 0

    JPA & Hibernate - Unable to build Hibernate SessionFactory - Java - GUJ

    com.br | 12 months ago
    javax.persistence.PersistenceException: [PersistenceUnit: wacf] Unable to build Hibernate SessionFactory

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.MappingException

      No Dialect mapping for JDBC type: -2

      at org.hibernate.dialect.TypeNames.get()
    2. Hibernate
      Column.getSqlType
      1. org.hibernate.dialect.TypeNames.get(TypeNames.java:70)
      2. org.hibernate.dialect.TypeNames.get(TypeNames.java:101)
      3. org.hibernate.dialect.Dialect.getTypeName(Dialect.java:341)
      4. org.hibernate.mapping.Column.getSqlType(Column.java:231)
      4 frames
    3. org.hibernate.hql
      AbstractMultiTableBulkIdStrategyImpl.prepare
      1. org.hibernate.hql.spi.id.AbstractMultiTableBulkIdStrategyImpl.buildIdTableCreateStatement(AbstractMultiTableBulkIdStrategyImpl.java:144)
      2. org.hibernate.hql.spi.id.persistent.PersistentTableBulkIdStrategy.buildIdTableInfo(PersistentTableBulkIdStrategy.java:130)
      3. org.hibernate.hql.spi.id.persistent.PersistentTableBulkIdStrategy.buildIdTableInfo(PersistentTableBulkIdStrategy.java:43)
      4. org.hibernate.hql.spi.id.AbstractMultiTableBulkIdStrategyImpl.prepare(AbstractMultiTableBulkIdStrategyImpl.java:84)
      4 frames
    4. Hibernate
      SessionFactoryImpl.<init>
      1. org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:453)
      1 frame
    5. org.hibernate.ogm
      OgmSessionFactoryBuilderImpl.build
      1. org.hibernate.ogm.boot.impl.OgmSessionFactoryBuilderImpl.build(OgmSessionFactoryBuilderImpl.java:54)
      2. org.hibernate.ogm.boot.impl.OgmSessionFactoryBuilderImpl.build(OgmSessionFactoryBuilderImpl.java:23)
      2 frames
    6. org.hibernate.jpa
      HibernatePersistenceProvider.createEntityManagerFactory
      1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879)
      2. org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
      2 frames
    7. Hibernate Object Grid Mapper
      HibernateOgmPersistence.createEntityManagerFactory
      1. org.hibernate.ogm.jpa.HibernateOgmPersistence.createEntityManagerFactory(HibernateOgmPersistence.java:59)
      1 frame
    8. JavaEE 7
      Persistence.createEntityManagerFactory
      1. javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
      2. javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39)
      2 frames
    9. service.util
      HibernateOgmUtil.<clinit>
      1. service.util.HibernateOgmUtil.<clinit>(HibernateOgmUtil.java:20)
      1 frame
    10. service.data.repositories
      QuestionRepository.<init>
      1. service.data.repositories.GenericRepository.<init>(GenericRepository.java:31)
      2. service.data.repositories.QuestionRepository.<init>(QuestionRepository.java:13)
      2 frames
    11. Unknown
      Playground.main
      1. Playground.main(Playground.java:31)
      1 frame