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

got error: Unable to find a driver that accepts jdbc:oceanbase #555

Open
xuekg opened this issue Mar 28, 2023 · 1 comment
Open

got error: Unable to find a driver that accepts jdbc:oceanbase #555

xuekg opened this issue Mar 28, 2023 · 1 comment

Comments

@xuekg
Copy link

xuekg commented Mar 28, 2023

got a error of p6spy when start springboot project:

java.sql.SQLException:Unable to find a driver that accepts jdbc:oceanbase://xx:2883/test?rewriteBatchedStatements=true&allowMultiQueries-true

this is the config of datasource.properties:
spring.datasource.driverClassName:com.p6spy.engine.spy.P6SpyDriver
spring.datasource.url=jdbc:p6spy:oceanbase://xx:2883/test?rewriteBatchedStatements=true&allowMultiQueries-true

when i changed the datasource.properties to this:
spring.datasource.driverClassName:com.alipay.oceanbase.jdbc.Driver
spring.datasource.url=jdbc:p:oceanbase://xx:2883/test

it works

the spy.properties contains this:
driverlist=com.alipay.oceanbase.jdbc.Driver
...

@caiosuzuki
Copy link

I am also getting a very similar error, but I am using sqlserver, my application.properties has:

spring.datasource.driver-class-name=com.p6spy.engine.spy.P6SpyDriver
spring.datasource.url=jdbc:p6spy:sqlserver://xx:1433;databaseName=MyDatabase

I am using p6spy through sentry-jdbc, which uses version 3.9.1 of p6spy

Just like @xuekg, when I stop using p6spy and use driver com.microsoft.sqlserver.jdbc.SQLServerDriver, my application works normally.

Also, a bizarre situation that happened to my application is that it ran for a few days with p6spy working normally, and then suddenly, the application went down with that "Unable to find a driver that accepts jdbc:sqlserver://xx:1433;databaseName=MyDatabase" error.

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