title: "Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource" when deploying a JHipster app on Heroku
body: <p>I have a JHipster/Spring monolithic site that I am trying to deploy to a Heroku free dyno with JawsDB Maria. I have JHipster configured to compile the project using Gradle on my local machine.</p>
  <p>I'm getting this error:</p>
  <pre><code>2020-11-27T00:13:51.332601+00:00 app[web.1]: 2020-11-27 00:13:51.329 ERROR 4 --- [           main] com.zaxxer.hikari.HikariConfig           : Failed to load driver class com.mysql.cj.jdbc.Driver from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClassLoader@6d00a15d
  2020-11-27T00:13:51.335652+00:00 app[web.1]: 2020-11-27 00:13:51.335  WARN 4 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource
  2020-11-27T00:13:51.360451+00:00 app[web.1]: 2020-11-27 00:13:51.360 ERROR 4 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :
  2020-11-27T00:13:51.360453+00:00 app[web.1]: 
  2020-11-27T00:13:51.360454+00:00 app[web.1]: ***************************
  2020-11-27T00:13:51.360454+00:00 app[web.1]: APPLICATION FAILED TO START
  2020-11-27T00:13:51.360455+00:00 app[web.1]: ***************************
  2020-11-27T00:13:51.360455+00:00 app[web.1]: 
  2020-11-27T00:13:51.360455+00:00 app[web.1]: Description:
  2020-11-27T00:13:51.360456+00:00 app[web.1]: 
  2020-11-27T00:13:51.360457+00:00 app[web.1]: Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:
  2020-11-27T00:13:51.360458+00:00 app[web.1]: 
  2020-11-27T00:13:51.360458+00:00 app[web.1]: Property: driverclassname
  2020-11-27T00:13:51.360459+00:00 app[web.1]: Value: com.mysql.cj.jdbc.Driver
  2020-11-27T00:13:51.360460+00:00 app[web.1]: Origin: &quot;driverClassName&quot; from property source &quot;source&quot;
  2020-11-27T00:13:51.360461+00:00 app[web.1]: Reason: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader
  2020-11-27T00:13:51.360462+00:00 app[web.1]: 
  2020-11-27T00:13:51.360462+00:00 app[web.1]: Action:
  2020-11-27T00:13:51.360462+00:00 app[web.1]: 
  2020-11-27T00:13:51.360463+00:00 app[web.1]: Update your application's configuration
  2020-11-27T00:13:51.360463+00:00 app[web.1]: 
  2020-11-27T00:13:51.487289+00:00 heroku[web.1]: Process exited with status 1
  2020-11-27T00:13:52.528199+00:00 heroku[web.1]: State changed from starting to crashed
  </code></pre>
  <p>The backend is written in Kotlin and uses MariaDB, while the frontend is written in Vue.js. I jave configured JHipster to compile the source code on my local machine.</p>
  <p>This is the auto-generated <code>application-heroku.yml</code>:</p>
  <pre><code>eureka:
    instance:
      hostname: financial-services-station.herokuapp.com
      non-secure-port: 80
      prefer-ip-address: false
  client:
      service-url:
      defaultZone: ${JHIPSTER_REGISTRY_URL}/eureka/
  
  spring:
    datasource:
      type: com.zaxxer.hikari.HikariDataSource
      url: ${JDBC_DATABASE_URL}
      username: ${JDBC_DATABASE_USERNAME}
      password: ${JDBC_DATABASE_PASSWORD}
      hikari:
      maximumPoolSize: 8
  </code></pre>
  <p>I already tried including <code>com.oracle.ojdbc:ojdbc10:19.3.0.0</code> in my gradle dependencies, which didn't fix it.</p>