5 Replies Latest reply on Sep 15, 2015 5:36 AM by bjarne Søegaard

    My issue with EAP 6.4 - possible java_home or version issue

    bjarne Søegaard Newbie

      Hej,

      I have a problem when deploying (running) a very simple hello world program connected to an empty but created EJB project.

      This is what I get:

       

      The server log says this:

      The server "JBoss EAP 6.1+" requires a JDK to run properly. The VM used to launch this server is not recognized as a valid JDK. C:\Program Files\Java\jre1.8.0_60

       

      Java_home is C:\Program Files\Java\jdk1.8.0_60  - so why does it use the JRE ???  - I have double checked java_home and PATH.  I cannot change this attribute via the console either.

       

      What to do ? Any help is welcome

       

      The error log  / console says this:

       

      20:51:06,240 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 53) MSC000001: Failed to start service jboss.persistenceunit."HandlingsPlan.ear/HandlingsPlanEJB.jar#HandlingsPlanEJB": org.jboss.msc.service.StartException in service jboss.persistenceunit."HandlingsPlan.ear/HandlingsPlanEJB.jar#HandlingsPlanEJB": javax.persistence.PersistenceException: [PersistenceUnit: HandlingsPlanEJB] Unable to build EntityManagerFactory

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_60]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_60]

        at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_60]

        at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]

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

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

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

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

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        ... 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:174)

        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:1827)

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

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

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

        ... 9 more

       

      I