java.sql.SQLException when trying to connect to azure database using spring-boot -


i have spring-boot project in try connect azure database. when run application i'm having weird error.

java.sql.sqlexception: driver:sqlserverdriver:2 returned null url:jdbc:h2:mem:testdb;db_close_delay=-1;db_close_on_exit=false 

this application.properties

spring.profiles.active=production spring.thymeleaf.cache=false  spring.datasource.platform=jdbc:sqlserver://spring-boot-intro.database.windows.net:1433;database=spring-boot-intro;encrypt=true;trustservercertificate=false;hostnameincertificate=*.database.windows.net;logintimeout=30; spring.datasource.username=fabio spring.datasource.password=*my password* spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.sqlserverdriver spring.jpa.hibernate.ddl-auto=create-drop 

these dependencies

<dependencies>     <dependency>         <groupid>org.springframework.boot</groupid>         <artifactid>spring-boot-starter-data-jpa</artifactid>     </dependency>     <dependency>         <groupid>org.springframework.boot</groupid>         <artifactid>spring-boot-starter-thymeleaf</artifactid>     </dependency>     <dependency>         <groupid>org.springframework.boot</groupid>         <artifactid>spring-boot-starter-web</artifactid>     </dependency>      <dependency>         <groupid>com.h2database</groupid>         <artifactid>h2</artifactid>         <scope>runtime</scope>     </dependency>      <dependency>         <groupid>com.microsoft.sqlserver</groupid>         <artifactid>slqjdbc6</artifactid>         <version>6</version>     </dependency>     <dependency>         <groupid>com.microsoft.sqlserver</groupid>         <artifactid>mssql-jdbc</artifactid>     </dependency>      <dependency>         <groupid>org.springframework.boot</groupid>         <artifactid>spring-boot-starter-test</artifactid>         <scope>test</scope>     </dependency> </dependencies> 

it because have use spring.datasource.platform instead of spring.datasource.url datasource url in application.properties.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - VueJS2 and the Window Object - how to use? -