0 Replies Latest reply on May 18, 2016 6:38 AM by Sergei Makarov

    Ticket-Monster Tutorial, first error after deploying:Persistence and Hibernate- Exceptions

    Sergei Makarov Newbie

      Hello,

       

      i am going through ticket-monster tutorial, and have stuck by the first chapter "Introduction and getting started":

       

      As I started and deployed my project for the very first time, after creating new project, always worked perfect, i also could see a table "Members" in H2Console, but after stopping server and adding Event and Venue Classes, rows to "import.sql" and Jax-Rc WS cannot start it correctly again, namely i have the following errors:

       

      ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 53) MSC000001: Failed to start service jboss.persistenceunit."ticket-monster.war#primary": org.jboss.msc.service.StartException in service jboss.persistenceunit."ticket-monster.war#primary": javax.persistence.PersistenceException: [PersistenceUnit: primary] Unable to build EntityManagerFactory

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_101]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_101]

          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_101]

          at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: primary] Unable to build EntityManagerFactory

          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:924)

          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)

          at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:76)

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200)

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57)

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99)

          ... 4 more

      Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set

          at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:98)

          at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:68)

          at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:170)

          at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:85)

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:184)

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:156)

          at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1825)

          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1783)

          at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)

          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)

       

      Any help will appreciate.

       

      Jboss Dev Studio 8.1.0, EAP 6.3