***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
Process finished with exit code 1
If you are making use of the spring-boot-starter-data-jpa in your application and when you start your application, you get the above error, one common reason for this is that you have missed adding the datasouce url path in either of application.properties or application.yml file.
Make sure you have the below property added.
spring.datasource.url
Example:
spring.datasource.url=jdbc:mysql://localhost:3306/db2
If using application.yml,
spring:
datasource:
url: jdbc:oracle:thin:@localhost:1521:db1
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Java,
- Deep Dive into Java 8 Predicate Interface
- Read and Parse XML file using Java DOM Parser [Java Tutorial]
- Java 8 Predicate Functional Interface isEqual() Method Example
- Convert Multidimensional Array toString In Java
- How to read int value using Scanner Class Java
- Spring Boot AI + LLM + Java Code Example
- Write to a File using Java Stream API
- Implementing Bubble Sort Algorithm using Java Program
- How to Fix XmlBeanDefinitionStoreException in Java SpringBoot ApplicationConfig.xml
- YAML Parser using Java Jackson Library Example
- [Fix] java: integer number too large compilation error
- Convert JSON String to Java GSON Object Example
- Read a file using Java 8 Stream
- Java Spring Boot 3 Web Hello World with Gradle in IntelliJ
- Ways Compare Dates in Java Programming with Examples
- Pretty Print JSON String in Java Console Output
- Java JDBC with Join Queries Example
- How to Check For Updates on Windows 11 (Step-by-Step)
- [Fix] java.net.MalformedURLException: unknown protocol
- How to display date and time in GMT Timezone in Java
- Error: LinkageError occurred while loading main class UnsupportedClassVersionError [Eclipse Java]
- How to convert a String to Java 8 Stream of Char?
- RabbitMQ Queue Listener Java Spring Boot Code Example
- 5+ Fibonacci number Series Java Program Examples [ 0 1 1 2 3 ..]
- Handling NullPointerException with Java Predicate
More Posts:
- Spring Boot: Setting up JDBCTemplate with MySQL Tutorial - Java
- How to create Jira API Token for Atlassian Account to connect Jira Cloud REST API - Jira
- Read file from Windows CMD (Command Line) - Windows
- cURL Option to show HTTP Response Status Code - cURL
- Java JDK 21 LTS Version Release Date (General Availability) - Java-JDK-21
- Zodiac Sign & Cusp Calculator - Tools
- Mac Studio Display Buzzing sound from the Monitor - Mac-OS-X
- Executing SQL Queries in Notepad++ using CSVQuery - NotepadPlusPlus