title: Java EE + Wildfly: Failed to start service jboss.persistenceunit
body: <p>I'm trying to setup a maven project to work with Wildfly and and MySql and I'm getting this error, I'm pretty sure it's a configuration problem. I'm using Wildfly so I don't have any hibernate configuration files (which is related to all solutions I've found). This is what I'm getting. I just started learning how to deal with RIA's so any thoughts will be very much appreciated.</p>
  
  <p>Question is mostly error log and code so thanks for the patience of anyone willing to help.</p>
  
  <p>My console errors:</p>
  
  <pre><code>17:53:34,909 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 62) MSC000001: Failed to start service jboss.persistenceunit."RPGo.war#RPGo": org.jboss.msc.service.StartException in service jboss.persistenceunit."RPGo.war#RPGo": org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:195)
      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:125)
      at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)
      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:209)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      at org.jboss.threads.JBossThread.run(JBossThread.java:320)
  Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:264)
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:228)
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207)
      at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)
      at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207)
      at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)
      at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:848)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:875)
      at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167)
      ... 7 more
  Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
      at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100)
      at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:54)
      at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:137)
      at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
      at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:254)
      ... 19 more
  
  17:53:34,909 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" =&gt; "RPGo.war")]) - failure description: {"WFLYCTL0080: Failed services" =&gt; {"jboss.persistenceunit.\"RPGo.war#RPGo\"" =&gt; "org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
      Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
      Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set"}}
  17:53:34,940 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "RPGo.war" (runtime-name : "RPGo.war")
  17:53:34,940 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
  WFLYCTL0186:   Services which failed to start:      service jboss.persistenceunit."RPGo.war#RPGo": org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
  </code></pre>
  
  <p>My persistance.xml</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"&gt;
          &lt;persistence-unit name="RPGo"&gt;
              &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
              &lt;jta-data-source&gt;java:jboss/datasources/RPGo&lt;/jta-data-source&gt;
              &lt;exclude-unlisted-classes&gt;false&lt;/exclude-unlisted-classes&gt;
              &lt;properties&gt;
                  &lt;property name="hibernate.hbm2ddl.auto" value="update" /&gt;
              &lt;/properties&gt;
          &lt;/persistence-unit&gt;
      &lt;/persistence&gt;
  </code></pre>
  
  <p>standalone.xml, urn:jboss:domain:datasources subsystem</p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:datasources:5.0"&gt;
      &lt;datasources&gt;
          &lt;datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true"&gt;
              &lt;connection-url&gt;jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE&lt;/connection-url&gt;
              &lt;driver&gt;h2&lt;/driver&gt;
              &lt;security&gt;
                  &lt;user-name&gt;sa&lt;/user-name&gt;
                  &lt;password&gt;sa&lt;/password&gt;
              &lt;/security&gt;
          &lt;/datasource&gt;
          &lt;datasource jta="true" jndi-name="java:jboss/datasources/RPGo" pool-name="RPGoPool" enabled="true" use-java-context="true"&gt;
              &lt;connection-url&gt;jdbc:mysql://localhost:3306/rpgo&lt;/connection-url&gt;
              &lt;driver&gt;mysql&lt;/driver&gt;
              &lt;security&gt;
                  &lt;user-name&gt;master&lt;/user-name&gt;
                  &lt;password&gt;master&lt;/password&gt;
              &lt;/security&gt;
          &lt;/datasource&gt;
          &lt;drivers&gt;
              &lt;driver name="h2" module="com.h2database.h2"&gt;
                  &lt;xa-datasource-class&gt;org.h2.jdbcx.JdbcDataSource&lt;/xa-datasource-class&gt;
              &lt;/driver&gt;
              &lt;driver name="mysql" module="com.mysql"&gt;
                  &lt;driver-class&gt;com.mysql.jdbc.Driver&lt;/driver-class&gt;
              &lt;/driver&gt;
          &lt;/drivers&gt;
      &lt;/datasources&gt;
  &lt;/subsystem&gt;
  </code></pre>
  
  <p>pom.xml dependencies:</p>
  
  <p></p>
  
  <pre><code>&lt;!-- JSF --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
      &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
      &lt;version&gt;2.2.13&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- JSF --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
      &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt;
      &lt;version&gt;2.2.13&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- PrimeFaces --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
      &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
      &lt;version&gt;5.3&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- CDI --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
      &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
      &lt;version&gt;1.2&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;!-- Métodos uteis para manipulação de String, métodos e etc --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
      &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
      &lt;version&gt;3.4&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- PROVIDER JPA(HIBERNATE) --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
      &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
      &lt;version&gt;4.3.0.Final&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- DEPENDENCIA MYSQL --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;mysql&lt;/groupId&gt;
      &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
      &lt;version&gt;5.1.44&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- Manipulação de XML --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;jdom&lt;/groupId&gt;
      &lt;artifactId&gt;jdom&lt;/artifactId&gt;
      &lt;version&gt;1.1&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;br.ufes.inf.nemo&lt;/groupId&gt;
      &lt;artifactId&gt;jbutler-wp&lt;/artifactId&gt;
      &lt;version&gt;1.2.4&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.primefaces.themes&lt;/groupId&gt;
      &lt;artifactId&gt;bootstrap&lt;/artifactId&gt;
      &lt;version&gt;1.0.10&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p></p>