qwe857359351a commented on issue #2399: 单元测试分库NullPointerException,ShardingPreparedStatement.executeUpdate URL: https://github.com/apache/incubator-shardingsphere/issues/2399#issuecomment-493399455 已找到原因,切换到4.0RC版本,出现了异常,主键用是Long,而我分库策略里用的是Integer,导致类型转换失败,下面执行分库策略时没有捕获异常,直接finally,建议加上异常捕获提示 try { clearPrevious(); sqlRoute(); initPreparedStatementExecutor(); return preparedStatementExecutor.executeUpdate(); } finally { //跳到了这里,routeResult为空 refreshTableMetaData(connection.getShardingContext(), routeResult.getSqlStatement()); clearBatch(); }
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
