title: Spring boot is not running with sql server using spring data and hibernate
body: <p>I'm trying to connect to MS SQL sever using Spring Boot spring data /jpa .
  <strong>I add the driver to my pom file</strong>. I checked that spring data uses it ( when I change the name of it in the pom file delibratly  I get an error when running it, as I expected).</p>
  
  <p>I use the following  params in application.properties:</p>
  
  <pre><code>spring.datasource.username=xxx
  
  spring.datasource.password=yyy
  spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerConnection
  spring.datasource.testOnBorrow=true
  spring.datasource.validationQuery=SELECT 1
  spring.jpa.database=sqlserver
  spring.jpa.show-sql=true
  spring.jpa.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect
  </code></pre>
  
  <p>When running the application I get this:</p>
  
  <p><code>java.sql.SQLException: com.microsoft.sqlserver.jdbc.SQLServerConnection at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:280)</code></p>
  
  <p>my pom file looks like this:</p>
  
  <pre><code> &lt;dependency&gt;
        &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
        &lt;artifactId&gt;sqljdbc4&lt;/artifactId&gt;
        &lt;version&gt;4.0&lt;/version&gt;
   &lt;/dependency&gt;
  </code></pre>
  
  <p>When I run a simple app using the same driver all is working..</p>
  
  <p>Am I missing something? some parameters? Wrong parammeters?</p>
  
  <p>Any idea?</p>
  
  <p>Here is the complete stack trace:</p>
  
  <pre><code>java.sql.SQLException: com.microsoft.sqlserver.jdbc.SQLServerConnection
      at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:280)
      at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:200)
      at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699)
      at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:633)
      at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:484)
      at org.apache.tomcat.jdbc.pool.ConnectionPool.&lt;init&gt;(ConnectionPool.java:142)
      at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:115)
      at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:102)
      at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:126)
      at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139)
      at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)
      at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:219)
      at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:203)
      at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:522)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845)
      at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844)
      at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)
      at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343)
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:956)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:747)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
      at com.ubs.Application.main(Application.java:23)
  Caused by: java.lang.InstantiationException: com.microsoft.sqlserver.jdbc.SQLServerConnection
      at java.lang.Class.newInstance(Class.java:359)
      at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:268)
      ... 38 common frames omitted
  </code></pre>