Driver com.microsoft.sqlserver.jdbc.SQLServerDriver claims to not accept jdbcUrl, ${SPRING_DATASOURCE_URL}: GitHub Actions

48 views Asked by At

I am working on a Spring Boot project. For production environment, I am using SQL Server AND Azure App Service. I followed following steps to configure my deployment. My database url is-

jdbc:sqlserver://spring-sql-server.database.windows.net:1433;database=<database-name>;user=<username>@spring-sql-server;password=<password>;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;
  1. Added all my secrets to the GitHub Repository Secrets. enter image description here
  2. Added environment variable configuration to my application.properties file. enter image description here

When I build my project using GitHub Actions, I get an error-

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is java.lang.RuntimeException: Driver com.microsoft.sqlserver.jdbc.SQLServerDriver claims to not accept jdbcUrl, ${SPRING_DATASOURCE_URL}

I have added the URL properly but still getting this error. (I am not sure, but is it possible that the error might be because of a '#' in my passsword?)

0

There are 0 answers