title: Intellij IDEA and JPA Console 'hibernate.dialect' not set error during a query to Sql Server table
body: <p>I've configured Intellij to connect to a Sql Server DB.
  The connection works fine and if I try to get results by using a Rest API all works!</p>
  
  <p>The problem is when I try to test queries using the JPA Console.
  I've this error back</p>
  
  <pre><code>[2018-12-11 12:24:05] org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
  [2018-12-11 12:24:05] java.lang.RuntimeException: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:54)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:137)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
  [2018-12-11 12:24:05]   at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:94)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)
  [2018-12-11 12:24:05]   at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:100)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:246)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.convertSqlException(BasicConnectionCreator.java:116)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection(DriverConnectionCreator.java:41)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.createConnection(BasicConnectionCreator.java:58)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections.addConnections(DriverManagerConnectionProviderImpl.java:363)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections.&lt;init&gt;(DriverManagerConnectionProviderImpl.java:282)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections.&lt;init&gt;(DriverManagerConnectionProviderImpl.java:260)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections$Builder.build(DriverManagerConnectionProviderImpl.java:401)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.buildPool(DriverManagerConnectionProviderImpl.java:112)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:75)
  [2018-12-11 12:24:05]   at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:100)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:246)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)
  [2018-12-11 12:24:05]   at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
  [2018-12-11 12:24:05]   at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:94)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
  [2018-12-11 12:24:05]   at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
  [2018-12-11 12:24:05]   at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
  [2018-12-11 12:24:05]   at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.&lt;init&gt;(InFlightMetadataCollectorImpl.java:179)
  [2018-12-11 12:24:05]   at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:119)
  [2018-12-11 12:24:05]   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:904)
  [2018-12-11 12:24:05]   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:935)
  [2018-12-11 12:24:05]   at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:56)
  [2018-12-11 12:24:05]   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
  [2018-12-11 12:24:05]   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
  [2018-12-11 12:24:05]   at com.intellij.jpa.remote.impl.JpaFacadeImpl.createEntityManagerFactory(JpaFacadeImpl.java:17)
  [2018-12-11 12:24:05]   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [2018-12-11 12:24:05]   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  [2018-12-11 12:24:05]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  [2018-12-11 12:24:05]   at java.lang.reflect.Method.invoke(Method.java:498)
  [2018-12-11 12:24:05]   at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324)
  [2018-12-11 12:24:05]   at sun.rmi.transport.Transport$1.run(Transport.java:200)
  [2018-12-11 12:24:05]   at sun.rmi.transport.Transport$1.run(Transport.java:197)
  [2018-12-11 12:24:05]   at java.security.AccessController.doPrivileged(Native Method)
  [2018-12-11 12:24:05]   at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
  [2018-12-11 12:24:05]   at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
  [2018-12-11 12:24:05]   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
  [2018-12-11 12:24:05]   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
  [2018-12-11 12:24:05]   at java.security.AccessController.doPrivileged(Native Method)
  [2018-12-11 12:24:05]   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
  [2018-12-11 12:24:05]   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  [2018-12-11 12:24:05]   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  [2018-12-11 12:24:05]   at java.lang.Thread.run(Thread.java:745) (no stack trace)
  </code></pre>
  
  <p>The configuration of <strong>application.properties</strong> is: </p>
  
  <pre><code>spring.jpa.hibernate.ddl-auto = validate
  spring.jpa.show-sql=true
  spring.datasource.url=jdbc:sqlserver://localhost;databaseName=db-chklist;integratedSecurity=true;
  spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.SQLServerDialect
  </code></pre>