You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/02/18 08:41:45 UTC
[GitHub] [shardingsphere] ynfeng opened a new issue #15497: NPE with flywaydb
ynfeng opened a new issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497
version: 5.1.0
Caused by: java.lang.NullPointerException
at org.apache.shardingsphere.driver.jdbc.adapter.AdaptedDatabaseMetaData.getDatabaseProductName(AdaptedDatabaseMetaData.java:46)
at org.flywaydb.core.internal.jdbc.JdbcUtils.getDatabaseProductName(JdbcUtils.java:169)
at org.flywaydb.core.internal.jdbc.DatabaseType.fromJdbcConnection(DatabaseType.java:68)
at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.<init>(JdbcConnectionFactory.java:82)
at org.flywaydb.core.Flyway.execute(Flyway.java:456)
at org.flywaydb.core.Flyway.repair(Flyway.java:369)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1046563892
@LeeGuoPing Welcome.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ynfeng commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
ynfeng commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044212002
Oh, I found the problem. The config in yaml dosen't support this format.

and this is ok.

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu closed issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ynfeng commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
ynfeng commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044163962
spring:
datasource:
url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
flyway:
enabled: true
clean-disabled: true
locations: classpath:db/migration
table: flyway_schema_history
baseline-on-migrate: true
baseline-version: 1
encoding: UTF-8
out-of-order: false
schemas: demo
validate-on-migrate: false
shardingsphere:
rules:
readwrite-splitting:
data-sources:
readwrite-ds:
type: Static
props:
write-data-source-name: main-ds
read-data-source-names: readonly-ds
datasource:
names:
- main-ds
- readonly-ds
main-ds:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
readonly-ds:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1073290033
I close the issue because of no response anymore.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] LeeGuoPing commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
LeeGuoPing commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1046551383
May I have a try
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ynfeng removed a comment on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
ynfeng removed a comment on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044163962
spring:
datasource:
url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
flyway:
enabled: true
clean-disabled: true
locations: classpath:db/migration
table: flyway_schema_history
baseline-on-migrate: true
baseline-version: 1
encoding: UTF-8
out-of-order: false
schemas: demo
validate-on-migrate: false
shardingsphere:
rules:
readwrite-splitting:
data-sources:
readwrite-ds:
type: Static
props:
write-data-source-name: main-ds
read-data-source-names: readonly-ds
datasource:
names:
- main-ds
- readonly-ds
main-ds:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
readonly-ds:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044316413
> Oh, I found the problem. The config in yaml dosen't support this format.  but this is ok. 
Yes, The second way are right. It 's not support first way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ynfeng commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
ynfeng commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044151716
spring:
datasource:
url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
flyway:
enabled: true
clean-disabled: true
locations: classpath:db/migration
table: flyway_schema_history
baseline-on-migrate: true
baseline-version: 1
encoding: UTF-8
out-of-order: false
schemas: demo
validate-on-migrate: false
shardingsphere:
rules:
readwrite-splitting:
data-sources:
readwrite-ds:
type: Static
props:
write-data-source-name: main-ds
read-data-source-names: readonly-ds
datasource:
names:
- main-ds
- readonly-ds
main-ds:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
readonly-ds:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044338387
@ynfeng Hi, Can you submit a pull request to add a friendly prompt for it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ynfeng commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
ynfeng commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044170371
Here is the configuration snippet, hope this information is useful
[config.txt](https://github.com/apache/shardingsphere/files/8095651/config.txt)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu edited a comment on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
strongduanmu edited a comment on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044151729
Hi @ynfeng, thank you for your feedback. I'm not familiar with flywaydb, can you dig into the code to see what caused the exception? Or provide steps to reproduce the problem?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044151729
Hi @ynfeng, thank you for your feedback. I'm not familiar with flywaydb, can you dig into the code to see what caused the exception?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] LeeGuoPing commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
LeeGuoPing commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1049639452
sorry, I use the config but never reproduce the problem.
The config:

The result:

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ynfeng commented on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
ynfeng commented on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044179716
In class org.apache.shardingsphere.driver.jdbc.core.datasource.metadata.ShardingSphereDatabaseMetaData line 57, the dataSourcesMetaData was null.

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ynfeng edited a comment on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
ynfeng edited a comment on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044212002
Oh, I found the problem. The config in yaml dosen't support this format.

but this is ok.

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ynfeng removed a comment on issue #15497: NPE with flywaydb
Posted by GitBox <gi...@apache.org>.
ynfeng removed a comment on issue #15497:
URL: https://github.com/apache/shardingsphere/issues/15497#issuecomment-1044151716
spring:
datasource:
url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
flyway:
enabled: true
clean-disabled: true
locations: classpath:db/migration
table: flyway_schema_history
baseline-on-migrate: true
baseline-version: 1
encoding: UTF-8
out-of-order: false
schemas: demo
validate-on-migrate: false
shardingsphere:
rules:
readwrite-splitting:
data-sources:
readwrite-ds:
type: Static
props:
write-data-source-name: main-ds
read-data-source-names: readonly-ds
datasource:
names:
- main-ds
- readonly-ds
main-ds:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
readonly-ds:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/demo?useUnicode=true&autoReconnect=true&useSSL=false&characterEncoding=UTF8&allowMultiQueries=true
username: root
password: 123456
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org