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

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 '' at line 1 #745

Open
sysmat opened this issue Mar 23, 2022 · 6 comments
Labels
status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged

Comments

@sysmat
Copy link

sysmat commented Mar 23, 2022

  • java 17
  • spring-boot-starter-parent: 2.6.4; spring-boot-starter-webflux; r2dbc-mysql
  • person record:
@Table("person")
record Person(@Id Integer id, String name, String surname) {}
  • person repository:
public interface PersonRepo extends ReactiveCrudRepository<Person, Integer>{}
  • person controller:
@GetMapping("/{id}")
private Mono<Person> findById(@PathVariable Integer id) {
        return personRepo.findById(id);
    }
  • error:
    Caused by: com.github.jasync.sql.db.mysql.exceptions.MySQLException: Error 1064 - #42000 - 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 '' at line 1
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 23, 2022
@sysmat
Copy link
Author

sysmat commented Mar 24, 2022

  • using 2 different drivers, same error:

  • com.github.jasync-sql:jasync-r2dbc-mysql:2.0.6

2022-03-24 07:21:42.623 ERROR 20852 --- [-netty-thread-1] c.g.jasync.sql.db.mysql.MySQLConnection  : <mysql-connection-1> Received an error message -> ErrorMessage(errorCode=1064, sqlState=#42000, errorMessage=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 '' at line 1)
2022-03-24 07:21:42.692 ERROR 20852 --- [-netty-thread-2] c.g.jasync.sql.db.mysql.MySQLConnection  : <mysql-connection-2> Received an error message -> ErrorMessage(errorCode=1064, sqlState=#42000, errorMessage=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 '' at line 1)

  • dev.miku:r2dbc-mysql:0.8.2.RELEASE
Caused by: io.r2dbc.spi.R2dbcBadGrammarException: 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 '' at line 1
	at dev.miku.r2dbc.mysql.ExceptionFactory.createException(ExceptionFactory.java:81) ~[r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]

@sysmat
Copy link
Author

sysmat commented Mar 24, 2022

  • I try with R2dbcRepository interface, same error

@mp911de
Copy link
Member

mp911de commented Mar 28, 2022

If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal sample that reproduces the problem.

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Mar 28, 2022
@sysmat
Copy link
Author

sysmat commented Mar 28, 2022

is there any spring property for r3dbc that will log SQL statements, like spring.jpa.show-sql?

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Mar 28, 2022
@mp911de
Copy link
Member

mp911de commented Mar 28, 2022

You can enable debug logging if you set the logger org.springframework.r2dbc.core to DEBUG.

@sysmat
Copy link
Author

sysmat commented Mar 28, 2022

  • logging.level.org.springframework.r2dbc.core=DEBUG no sql in log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

3 participants