gs-relational-data-access
gs-relational-data-access copied to clipboard
RelationalDataAccessApplication has org.springframework.jdbc.BadSqlGrammarException
https://github.com/spring-guides/gs-relational-data-access/blob/adcc29334279b01b9e9d9bafcfb1f8fe61e625c1/complete/src/main/java/com/example/relationaldataaccess/RelationalDataAccessApplication.java#L32
Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [DROP TABLE customers if exists ]; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if exists' at line 1
please change Sql spell to "jdbcTemplate.execute("DROP TABLE IF EXISTS customers");"
This easy fix is a good issue for a new contributor to fix, so I'm adding the good first issue label.
hello I tried to submit a PR for this fix but failed
How did it fail? What messages did you get and from what tools?
I'm using intelliJ it says this: Can't create a new pull request: Push failed: remote: Permission to spring-guides/gs-relational-data-access.git denied to 43v3rn88b. unable to access 'https://github.com/spring-guides/gs-relational-data-access.git/': The requested URL returned error: 403
Other than trying again, I have no idea what to tell you. I do my git work from the command line. You could try that.
I submitted a PR