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 2020/08/28 03:56:29 UTC

[GitHub] [shardingsphere] chengw315 opened a new issue #7115: NoSuchElementException when use shardingscaling4.1.1

chengw315 opened a new issue #7115:
URL: https://github.com/apache/shardingsphere/issues/7115


   > sharding-scaling、sharding-proxy 4.1.1 ; mysql 5.7.30
   
   there are 2 sharding-proxies(named s,t),  I use sharding-scaling to migrate data from s to t,  but I meet NoSuchElementException
   
   ### the response
   
   
   ```json
   {
     "success": false,
     "errorCode": 500,
     "errorMsg": "java.util.NoSuchElementException",
     "model": null
   }
   ```
   
   
   ### stdout.log of sharding-scaling:
   
   
   ```java
   [WARN ] 03:00:21.562 [nioEventLoopGroup-3-11] o.a.s.s.web.HttpServerHandler - Http request handle occur error:
   java.util.NoSuchElementException: null
   	at java.util.LinkedList$ListItr.next(LinkedList.java:890)
   	at org.apache.shardingsphere.shardingscaling.core.datasource.DataSourceManager.createDatasources(DataSourceManager.java:50)
   	at org.apache.shardingsphere.shardingscaling.core.datasource.DataSourceManager.<init>(DataSourceManager.java:45)
   	at org.apache.shardingsphere.shardingscaling.web.HttpServerHandler.startJob(HttpServerHandler.java:99)
   	at org.apache.shardingsphere.shardingscaling.web.HttpServerHandler.channelRead0(HttpServerHandler.java:76)
   	at org.apache.shardingsphere.shardingscaling.web.HttpServerHandler.channelRead0(HttpServerHandler.java:56)
   	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
   	.
   	.
   	.
   	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514)
   	at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044)
   	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
   	at java.lang.Thread.run(Thread.java:745)
   
   ```
   ### this is the request:
   
   
   ```json
   curl -X POST \
     http://localhost:13388/shardingscaling/job/start \
     -H 'content-type: application/json' \
     -d '{
      "ruleConfiguration": {
         "sourceDatasource": "db_source:\n url: jdbc:mysql://10.16.10.42:33307/columbia_limadw?serverTimezone=UTC&useSSL=false\n username: root\n password: 123456\n connectionTimeoutMilliseconds: 30000\n idleTimeoutMilliseconds: 60000\n maxLifetimeMilliseconds: 1800000\n maxPoolSize: 50",
         "sourceRule": "defaultTableStrategy:\n none:",
         "destinationDataSources": {
            "name": "dt_0",
            "password": "123456",
            "url": "jdbc:mysql://10.16.10.42:13308/bump_dvc_history?serverTimezone=UTC&useSSL=false",
            "username": "root"
         }
      },
      "jobConfiguration": {
         "concurrency": 3
      }
   }'
   ```
   
   "**sourceDatasource**" and  "**sourceRule**"  of the request is copy from **config-sharding.yaml** of source sharding-proxy
   ### config-sharding.yaml
   
   
   ```yaml
   schemaName: columbia_limadw
   
   dataSources:
     db_source:
       url: jdbc:mysql://10.16.10.42:33307/columbia_limadw?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
   
   shardingRule:
     defaultTableStrategy:
       none:
   
   ```
   
   I do this obey the document, help me please
   https://shardingsphere.apache.org/document/legacy/4.x/document/cn/manual/sharding-scaling/usage/


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] chengw315 commented on issue #7115: NoSuchElementException when use shardingscaling4.1.1

Posted by GitBox <gi...@apache.org>.
chengw315 commented on issue #7115:
URL: https://github.com/apache/shardingsphere/issues/7115#issuecomment-683647718


   > You should use the same sourceDatasource configuartion in docs.
   
   It works, but another question floats out water. It's 'java.lang.ClassCastException'.
   It happens in the first step--unmarshal the inline yaml to get DataSourceConfiguration
   Maybe It's a bug?  @kimmking 
   
   ### This is the debug picture
   _ConfigurationYamlConverter ,lines 48_
   ![classCastException](https://user-images.githubusercontent.com/43491115/91698574-87e0a880-eba5-11ea-9ffd-7cb1b4d5ba72.png)
   
   YamlEngine doesn't convert LinkedHashMap to YamlDataSourceConfiguration automatically, after I add the convertion, the problem go away
   
   ![convertResult](https://user-images.githubusercontent.com/43491115/91700071-e0b14080-eba7-11ea-963e-79d4d15ab7b6.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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] chengw315 edited a comment on issue #7115: NoSuchElementException when use shardingscaling4.1.1

Posted by GitBox <gi...@apache.org>.
chengw315 edited a comment on issue #7115:
URL: https://github.com/apache/shardingsphere/issues/7115#issuecomment-683647718


   > You should use the same sourceDatasource configuartion in docs.
   
   It works, but another question floats out water. It's 'java.lang.ClassCastException'.
   It happens in the first step--unmarshal the inline yaml to get DataSourceConfiguration
   Maybe It's a bug?  @kimmking 
   
   ### This is the debug picture
   _ConfigurationYamlConverter ,lines 48_
   ![classCastException](https://user-images.githubusercontent.com/43491115/91698574-87e0a880-eba5-11ea-9ffd-7cb1b4d5ba72.png)
   
   YamlEngine doesn't convert LinkedHashMap to YamlDataSourceConfiguration automatically, after I add the convertion, the problem go away
   
   ![convertResult](https://user-images.githubusercontent.com/43491115/91700071-e0b14080-eba7-11ea-963e-79d4d15ab7b6.png)
   
   
   ### param "data" of this method 
   
   
   ```java
   data = "ds_source: \n" +
                   "  dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n" +
                   "  properties:\n" +
                   "    jdbcUrl: jdbc:mysql://10.16.10.42:33307/columbia_limadw?serverTimezone=UTC&useSSL=false\n" +
                   "    username: root\n" +
                   "    password: '''123456'''\n" +
                   "    connectionTimeout: 30000\n" +
                   "    idleTimeout: 60000\n" +
                   "    maxLifetime: 1800000\n" +
                   "    maxPoolSize: 50\n" +
                   "    minPoolSize: 1\n" +
                   "    maintenanceIntervalMilliseconds: 30000\n" +
                   "    readOnly: false\n";
   ```
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] chengw315 closed issue #7115: NoSuchElementException when use shardingscaling4.1.1

Posted by GitBox <gi...@apache.org>.
chengw315 closed issue #7115:
URL: https://github.com/apache/shardingsphere/issues/7115


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #7115: NoSuchElementException when use shardingscaling4.1.1

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #7115:
URL: https://github.com/apache/shardingsphere/issues/7115#issuecomment-682339077


   You should use the same sourceDatasource configuartion in docs.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org