Search code examples
javaspring-bootoracle12c

How to fix 'java.sql.SQLException: ORA-01017: invalid username/password; logon denied' error in spring-boot


when i run spring-boot in eclipse, there is error:"java.sql.SQLException: ORA-01017: invalid username/password; logon denied".but when i use sqlplus log in this username and password it right.Please help me to solve this problem.Thanks!

This is my application.properties, my oracle's version is 12c

spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:ORCL
spring.datasource.data-username=C##ITEST
spring.datasource.data-password=1234

Solution

  • The keywords are incorrect : use 'username' instead of 'data-username' and 'password' instead of 'data-password'