当前位置: 代码迷 >> 综合 >> no columns to generate for ClassWriter【Sqoop迁移工具】
  详细解决方案

no columns to generate for ClassWriter【Sqoop迁移工具】

热度:52   发布时间:2023-12-17 13:08:47.0

报错信息如下所示:

 ERROR manager.SqlManager: Error reading from database: java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@54b0a583 is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@54b0a583 is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:930)at com.mysql.jdbc.MysqlIO.checkForOutstandingStreamingData(MysqlIO.java:2694)at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1868)at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2642)at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2571)at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1464)at com.mysql.jdbc.ConnectionImpl.getMaxBytesPerChar(ConnectionImpl.java:3030)at com.mysql.jdbc.Field.getMaxBytesPerCharacter(Field.java:592)at com.mysql.jdbc.ResultSetMetaData.getPrecision(ResultSetMetaData.java:444)at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:285)at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:240)at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:226)at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:295)at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1773)at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1578)at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96)at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:601)at org.apache.sqoop.Sqoop.run(Sqoop.java:143)at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)at org.apache.sqoop.Sqoop.main(Sqoop.java:236)14/12/03 16:37:58 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriterat org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1584)at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96)at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:601)at org.apache.sqoop.Sqoop.run(Sqoop.java:143)at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

解决办法:

  • 更新这个jar包: mysql-connector-java-5.1.32-bin.jar

mysql-connector-java 版本下载地址:

  • mysql-connector-java-5.1.32-bin.jar 下载地址

  • maven 地址: 大多版本地址

注意 我们需要的是一个jar包,下载的时候可能是一个压缩包。


  相关解决方案