#StartSETUP

Greetings. I admit I'm starting to learn what I can learn. And now I'm trying to learn About JPA. After I generate with JPA, SpringBoot Devtool, and also Posters SQL dependency, I want to connect to my database. But, for 3 days I've stick with this same error:
Failed to load driver class org.postgresql.Driver in either of HikariConfig class loader or Thread context classloader
Failed to load driver class org.postgresql.Driver in either of HikariConfig class loader or Thread context classloader
What I find that the problem is only from the application.properties, but I had research that the config only this:
spring.application.name=jpa
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=12345678
spring.application.name=jpa
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=12345678
Any help please
3 Replies
JavaBot
JavaBot2w ago
This post has been reserved for your question.
Hey @an0nym0_us! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Edmon
Edmon2w ago
This is what works for me: spring: datasource: url: jdbc:postgresql://localhost:5332/customer # This is the URL for the PostgreSQL Server running in docker using the 5332 mapping # Note 1: We can switch the port number to 5432 and connect to the PostgreSQL Server # running in localhost. But we will stick with the PostgreSQL running in docker for now. # "customer" is the name of the database that we are going to be creating username: postgres # username we created for PostgreSQL Server running in Docker password: password # password we created for PostgreSQL Server running in docker jpa: hibernate: ddl-auto: create-drop properties: hibernate: dialect: org.hibernate.dialect.PostgreSQLDialect format_sql: true show-sql: true main: web-application-type: servlet Below is the pox.xml file <dependencies> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency>
JavaBot
JavaBot2w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server