title: Unable to resolve name org.hibernate.dialect.SQLiteDialect
body: <p>Last week I said "let's try out the WildFly 10!" and after the basic configurations and the HelloWorld stuff I wanted to see how does the persistence work. A took my old ABC EAR having a JPA module, where Hibernate is used with SQLite. I set the dialect provided by <a href="http://search.maven.org/#artifactdetails%7Cnet.kemitix%7Csqlite-dialect%7C0.1.0%7Cjar" rel="nofollow">net.kemitix</a>.</p>
  
  <p>So, I set its dependency in POM file:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;net.kemitix&lt;/groupId&gt;
      &lt;artifactId&gt;sqlite-dialect&lt;/artifactId&gt;
      &lt;version&gt;0.1.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>and after packaging the EAR looks like this:</p>
  
  <pre><code>ABC_Ear-0.0.1-SNAPSHOT.ear
      lib
          ABC_Jpa-0.0.1-SNAPSHOT.jar
          sqlite-dialect-0.1.0.jar
          sqlite-jdbc-3.8.11.2.jar
  </code></pre>
  
  <p>The persistence.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="ABC_Jpa" transaction-type="JTA"&gt;
          &lt;class&gt;abc.jpa.User&lt;/class&gt;
          &lt;class&gt;abc.jpa.Group&lt;/class&gt;
          &lt;properties&gt;
              &lt;property name="javax.persistence.jdbc.url" value="jdbc:sqlite:C:/sqlite/ABC.db"/&gt;
              &lt;property name="javax.persistence.jdbc.driver" value="org.sqlite.JDBC"/&gt;
              &lt;property name="jboss.entity.manager.factory.jndi.name" value="java:jboss/AbcEntityManagerFactory" /&gt;
              &lt;property name="jboss.entity.manager.jndi.name" value="java:/AbcEntityManager"/&gt;
              &lt;property name="hibernate.dialect" value="org.hibernate.dialect.SQLiteDialect"/&gt;
              &lt;property name="hibernate.show_sql" value="true"/&gt;
              &lt;property name="hibernate.hbm2ddl.auto" value="create"/&gt; 
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>During the deployment the following exception occurs:</p>
  
  <pre><code>INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 67) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'ABC_Jpa-0.0.1-SNAPSHOT.jar#ABC_Jpa'
  WARN  [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator] (ServerService Thread Pool -- 67) HHH000342: Could not obtain connection to query metadata : Unable to resolve name [org.hibernate.dialect.SQLiteDialect] as strategy [org.hibernate.dialect.Dialect]
  ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 67) MSC000001: Failed to start service jboss.persistenceunit."ABC_Jpa-0.0.1-SNAPSHOT.jar#ABC_Jpa": org.jboss.msc.service.StartException in service jboss.persistenceunit."ABC_Jpa-0.0.1-SNAPSHOT.jar#ABC_Jpa": 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:172)
      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117)
      at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:667)
      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      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:244)
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:208)
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)
      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:217)
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)
      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:847)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:874)
      at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154)
      ... 7 more
  Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.dialect.SQLiteDialect] as strategy [org.hibernate.dialect.Dialect]
  </code></pre>
  
  <p>I tried also to load the JAR containing the dialect together with the driver itself, but with the same result:</p>
  
  <p><strong>C:\wildfly-10.0.0.Final\modules\system\layers\base\org\xerial\sqlite-jdbc\main\module.xml</strong></p>
  
  <pre><code>&lt;module xmlns="urn:jboss:module:1.3" name="org.xerial.sqlite-jdbc"&gt;
      &lt;resources&gt;
          &lt;resource-root path="sqlite-dialect-0.1.0.jar"/&gt;
          &lt;resource-root path="sqlite-jdbc-3.8.11.2.jar"/&gt;
      &lt;/resources&gt;
      &lt;dependencies&gt;
          &lt;module name="javax.api"/&gt;
          &lt;module name="javax.transaction.api"/&gt;
      &lt;/dependencies&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>Has somebody a working solution for this problem? Meantime I will reread again the related sections from WildFly documentation :-)</p>
  
  <p>Best regards,
  Kérdezösködő Indián</p>