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.
   ![1](https://user-images.githubusercontent.com/7802558/154655829-83a862a2-4bb9-4be7-9cb9-277aa4419dd5.jpg)
   and this is ok.
   ![2](https://user-images.githubusercontent.com/7802558/154655877-f89ebbae-56cd-4d01-ba73-c9ce8f5a9cf9.jpg)
   
   


-- 
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. ![1](https://user-images.githubusercontent.com/7802558/154655829-83a862a2-4bb9-4be7-9cb9-277aa4419dd5.jpg) but this is ok. ![2](https://user-images.githubusercontent.com/7802558/154655877-f89ebbae-56cd-4d01-ba73-c9ce8f5a9cf9.jpg)
   
   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:
   ![config](https://user-images.githubusercontent.com/35389145/155493339-673b1fb9-45cc-4998-91ec-598f019ba9b6.png)
   
   The result:
   ![image](https://user-images.githubusercontent.com/35389145/155493527-3babb4db-9959-4944-8133-8c715aa5b571.png)
   
   


-- 
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.
   ![20220218170208](https://user-images.githubusercontent.com/7802558/154651598-74755e45-dd61-4ab4-93d8-dc69c5c3d8ba.jpg)
   
   


-- 
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.
   ![1](https://user-images.githubusercontent.com/7802558/154655829-83a862a2-4bb9-4be7-9cb9-277aa4419dd5.jpg)
   but this is ok.
   ![2](https://user-images.githubusercontent.com/7802558/154655877-f89ebbae-56cd-4d01-ba73-c9ce8f5a9cf9.jpg)
   
   


-- 
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