title: Spring boot Bean exception: Cannot determine embedded database driver class for database type NONE
body: <p>I am trying to run a spring boot application which is made by someone else. I have tried to attach my local database to the application but when I run this, it gives the following error;</p>
  
  <blockquote>
    <p>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.sql.DataSource org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.dataSource; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration$NonEmbeddedConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).</p>
  </blockquote>
  
  <p>I am new to this and I can't find out what is the problem. Some details:</p>
  
  <p>where xxx = name of the database.</p>
  
  <p>Workbench: </p>
  
  <pre><code>Name: Local instance wampmysqld64
  Host: localhost
  Port: 3306
  Server: MySQL Community Server (GPL)
  Version: 5.7.18-log
  Connector: C++ 1.1.4 
  Login User: root
  Current User: root@localhost
  SSL: Disabled
  </code></pre>
  
  <p>And the server is up and running.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>&lt;project&gt;
  
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;****&lt;/groupId&gt;
  &lt;artifactId&gt;****&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.3.6.RELEASE&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.modelmapper&lt;/groupId&gt;
        &lt;artifactId&gt;modelmapper&lt;/artifactId&gt;
        &lt;version&gt;1.1.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-rest&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
      &lt;/dependency&gt;
         &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>EDIT2</strong></p>
  
  <p><strong>Application.properties</strong></p>
  
  <pre><code>spring.datasource.url=jdbc:mysql://localhost:3306/xxx
  spring.datasource.username=root
  spring.datasource.password=root
  
  spring.jpa.hibernate.ddl-auto=update
  spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
  spring.jpa.properties.hibernate.id.new_generator_mappings = false
  spring.jpa.properties.hibernate.format_sql = true
  logging.level.org.hibernate.SQL=DEBUG
  logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE 
  </code></pre>
  
  <p>ng.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE </p>
  
  <p><strong>Application.java</strong></p>
  
  <pre><code>package gdprserver;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
  import org.springframework.boot.builder.SpringApplicationBuilder;
  import org.springframework.boot.context.web.SpringBootServletInitializer;
  import org.springframework.context.annotation.Bean;
  
  @SpringBootApplication(exclude = RepositoryRestMvcAutoConfiguration.class)
  public class Application extends SpringBootServletInitializer {
      @Override
      protected SpringApplicationBuilder configure(final SpringApplicationBuilder application) {
          return application.sources(Application.class);
      }
  
      public static void main(final String[] args) {
          SpringApplication.run(Application.class, args);
      }
  
      @Bean
      public ModelMapper modelMapper() {
          return new ModelMapper();
      }
  }
  </code></pre>
  
  <p><strong>EDIT3</strong></p>
  
  <p>I run the Spring boot application with CMD using the command: <code>java -jar xxx.jar</code></p>