In my spring boot I'm making a connection to Oracle Database using Oracle wallet. But while connecting to the database getting invalid username/ password error.
enter image description here
defined data source information inside application.properties file:
spring.datasource.url=jdbc:oracle:thin:#name_in_tnsnames?TNS_ADMIN=C:/path/to/oracle/wallet
Related
My understanding is that if my MongoDB database is not running, my Spring Boot application will take 30000ms by default to try to connect to the database.
How can I modify the value of 30000 ms? I tried putting the following in the application.properties but it doesn't work:
spring.data.mongodb.option.server-selection-timeout=1000
We are using Java Spring Boot 2.3 alongside Postgresql as our database.
For better availability, we want to implement Multi A-Z and RDS Proxy for Postgresql.
In application.properties file, we are using the following properties for normal connection to the database and all works fine
spring.datasource.url=jdbc:postgresql://zzzz.us-east-1.rds.amazonaws.com:5432/postgres
spring.datasource.username=xxx
spring.datasource.password=yyy
When using RDS Proxy, i am trying to use same properties, but instead of the DB URL, i am using the endpoint of the RDS Proxy
spring.datasource.url=jdbc:postgresql://rds-proxy-endpoint.us-east-1.rds.amazonaws.com:5432/postgres
spring.datasource.username=xxx
spring.datasource.password=yyy
For testing purposes, RDS Proxy Security group is open and my machine has access to it, but still it wont let me connect, here is the error
24832 [task-1] ERROR com.zaxxer.hikari.pool.HikariPool --- HikariPool-1 - Exception during pool initialization.
org.postgresql.util.PSQLException: The connection attempt failed.
Am i missing something?
Thanks a lot in advance
So i'm trying to create basic SpringBoot app with DB connectivity and here is my application.properties
spring.datasource.url=jdbc:mysql://sql.somehost.net:3306/thisismydbname
spring.datasource.username=sql9XXXXXX
spring.datasource.password=XXXXXXXX
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.database-platform = org.hibernate.dialect.MySQL5Dialect
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto = update
I created a very basic SpringBoot app with Spring Data JPA and maybe Spring Web dependencies.
When I try to boot up the app, I get the following error
java.sql.SQLException: Access denied for user 'sql9XXXXXX'#'ip6x-xxx-xx-xxx.dc.dc.cox.net' (using password: YES)
When I try to connect to MySQL using MySQL Workbench externally this works fine. Also, it's very weird why it's trying to use my ISP Cox in the connection. I don't know how it picked up my ISP details. I do have the somehost.net where my MySQL is hosted.
I have designed a Java derby database application. It had the dbproperties file. I'm creating a database file with these properties. Even it had username and password. The database is accessible in razorsql without any authentication. Suggest me where I'm missing.
creating Database
dbproperties
I'm trying to integrate Amazon RDS with webapp developed in Spring MVC. I'm using Flyway as db migration tool. I'm able to connect to the RDS but the thing is whenever flyway starts the migration, it tries to create schema_version table without firing use database_name query.
And that's where RDS throws error saying "No Database Selected".
I tried setting schema for flyway, flyway.setSchemas("koomi");, but no help, its still giving same error.
So is there any way by which we can make flyway to execute use database_name query before it fires query for schema_version?
Put the database name in the url and you should be ok