org.glassfish.deployment.common.DeploymentException: [PersistenceUnit: blog-data-pu] Unable to build Hibernate SessionFactory

Hibernate JIRA | Pavel Martynov | 2 years ago
  1. 0

    [OGM-787] Unable to build Hibernate SessionFactory under glassfish4.1 with hibernate-ogm 4.1.3 - Hibernate JIRA

    atlassian.net | 11 months ago
    org.glassfish.deployment.common.DeploymentException: Unable to build Hibernate SessionFactory
  2. 0

    Hibernate session could not be built on Glassfish 4.1 application server Steps to reproduce: 1. Download latest GF version http://dlc.sun.com.edgesuite.net/glassfish/4.1/release/glassfish-4.1.zip 2.Run mongodb instance. Application expects it to be running on localhost. Could be changed in persistence.xml (https://www.mongodb.org/downloads) 3. Build the attached test application with new-ogm-libs profile (mvn clean package -P new-ogm-libs) 4. Deploy the cmsss.ear artifact 5. org.glassfish.deployment.common.DeploymentException: [PersistenceUnit: blog-data-pu] Unable to build Hibernate SessionFactory at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:182) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534) at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565) at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846) at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164) at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:597) at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:484) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:412) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:403) at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Caused by: javax.persistence.PersistenceException: [PersistenceUnit: blog-data-pu] Unable to build Hibernate SessionFactory at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1239) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.access$600(EntityManagerFactoryBuilderImpl.java:120) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:855) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844) at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:152) at org.hibernate.ogm.jpa.HibernateOgmPersistence.createContainerEntityManagerFactory(HibernateOgmPersistence.java:105) at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:199) at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107) at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223) at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510) at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230) at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925) at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:309) at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:88) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:155) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:152) at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:232) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:241) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:267) at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:152) ... 25 more Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.ogm.persister.impl.SingleTableOgmEntityPersister at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:185) at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:135) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:401) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852) ... 45 more Caused by: org.hibernate.HibernateException: OGM000068: Could not configure property org.ogmtest.cms.data.entity.blog.BlogEntry#status at org.hibernate.ogm.persister.impl.OgmEntityPersister.<init>(OgmEntityPersister.java:275) at org.hibernate.ogm.persister.impl.SingleTableOgmEntityPersister.<init>(SingleTableOgmEntityPersister.java:35) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:163) ... 49 more Caused by: org.hibernate.HibernateException: OGM000059: Unable to find a GridType for org.hibernate.type.EnumType at org.hibernate.ogm.type.impl.TypeTranslatorImpl.getType(TypeTranslatorImpl.java:100) at org.hibernate.ogm.persister.impl.OgmEntityPersister.<init>(OgmEntityPersister.java:272) ... 55 more]] =================================================== The application works with the older libraries. To check it, just repeat steps 3-5 with old-ogm-libs profile. 3. Build the attached test application with old-ogm-libs profile (mvn clean package -P old-ogm-libs) 4. Deploy the cmsss.ear artifact 5. Application is successfully deployed.

    Hibernate JIRA | 2 years ago | Pavel Martynov
    org.glassfish.deployment.common.DeploymentException: [PersistenceUnit: blog-data-pu] Unable to build Hibernate SessionFactory
  3. 0

    Hibernate session could not be built on Glassfish 4.1 application server Steps to reproduce: 1. Download latest GF version http://dlc.sun.com.edgesuite.net/glassfish/4.1/release/glassfish-4.1.zip 2.Run mongodb instance. Application expects it to be running on localhost. Could be changed in persistence.xml (https://www.mongodb.org/downloads) 3. Build the attached test application with new-ogm-libs profile (mvn clean package -P new-ogm-libs) 4. Deploy the cmsss.ear artifact 5. org.glassfish.deployment.common.DeploymentException: [PersistenceUnit: blog-data-pu] Unable to build Hibernate SessionFactory at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:182) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534) at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565) at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846) at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164) at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:597) at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:484) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:412) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:403) at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Caused by: javax.persistence.PersistenceException: [PersistenceUnit: blog-data-pu] Unable to build Hibernate SessionFactory at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1239) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.access$600(EntityManagerFactoryBuilderImpl.java:120) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:855) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844) at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:152) at org.hibernate.ogm.jpa.HibernateOgmPersistence.createContainerEntityManagerFactory(HibernateOgmPersistence.java:105) at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:199) at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107) at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223) at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510) at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230) at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925) at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:309) at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:88) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:155) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:152) at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:232) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:241) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:267) at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:152) ... 25 more Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.ogm.persister.impl.SingleTableOgmEntityPersister at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:185) at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:135) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:401) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852) ... 45 more Caused by: org.hibernate.HibernateException: OGM000068: Could not configure property org.ogmtest.cms.data.entity.blog.BlogEntry#status at org.hibernate.ogm.persister.impl.OgmEntityPersister.<init>(OgmEntityPersister.java:275) at org.hibernate.ogm.persister.impl.SingleTableOgmEntityPersister.<init>(SingleTableOgmEntityPersister.java:35) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:163) ... 49 more Caused by: org.hibernate.HibernateException: OGM000059: Unable to find a GridType for org.hibernate.type.EnumType at org.hibernate.ogm.type.impl.TypeTranslatorImpl.getType(TypeTranslatorImpl.java:100) at org.hibernate.ogm.persister.impl.OgmEntityPersister.<init>(OgmEntityPersister.java:272) ... 55 more]] =================================================== The application works with the older libraries. To check it, just repeat steps 3-5 with old-ogm-libs profile. 3. Build the attached test application with old-ogm-libs profile (mvn clean package -P old-ogm-libs) 4. Deploy the cmsss.ear artifact 5. Application is successfully deployed.

    Hibernate JIRA | 2 years ago | Pavel Martynov
    org.glassfish.deployment.common.DeploymentException: [PersistenceUnit: blog-data-pu] Unable to build Hibernate SessionFactory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    OGM000059: Unable to find a GridType for string, Hibernate OGM, Redis

    Stack Overflow | 11 months ago | M Human Attaie
    javax.persistence.PersistenceException: [PersistenceUnit: HLS] Unable to build Hibernate SessionFactory
  6. 0

    Hibernate Community • View topic - error - Unable to find a GridType for string

    hibernate.org | 11 months ago
    javax.persistence.PersistenceException: [PersistenceUnit: cassandra] 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.HibernateException

      OGM000059: Unable to find a GridType for org.hibernate.type.EnumType

      at org.hibernate.ogm.type.impl.TypeTranslatorImpl.getType()
    2. Hibernate Object Grid Mapper
      OgmEntityPersister.<init>
      1. org.hibernate.ogm.type.impl.TypeTranslatorImpl.getType(TypeTranslatorImpl.java:100)
      2. org.hibernate.ogm.persister.impl.OgmEntityPersister.<init>(OgmEntityPersister.java:272)
      2 frames