Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.5] Postgresql Service Name is incorrect - "Developer Lab 3 - Swagger to REST, Task 5 of 8" #353

Open
honghuac opened this issue Oct 2, 2019 · 1 comment

Comments

@honghuac
Copy link
Contributor

honghuac commented Oct 2, 2019

Developer Lab 3 - Swagger to REST, Task 5 of 8

Execution of run:spring-boot script results in a wrong password error:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.602 s
[INFO] Finished at: 2019-10-02T04:12:45Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.4.RELEASE:run (default-cli) on project location-service: An exception occurred while running. null: InvocationTargetException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceInitializer': Invocation of init method failed; nested exception is org.springframework.jdbc.datasource.init.UncategorizedScriptException: Failed to execute database script; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: password authentication failed for user "dbuser" -> [Help 1]
[ERROR]

@sigreen
Copy link
Contributor

sigreen commented Oct 2, 2019

In step 5, you setup the database username to be 'dbuser' and the password is set to 'password'. This should match the application.properties file that is set in "Update the Camel Routes" > Step 8. Do those values match? Often when delivering this workshop, users forget to create the postgres DB in the correct user project i.e. user1 project, hence the issue with connecting or possibly authentication issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants