Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> Should not show NPE exception when occurs import failure


Copy link to this message
-
Re: Should not show NPE exception when occurs import failure
Hi Sam,
thank you very much for sharing this concern with us. Would you mind opening a new JIRA for this?

https://issues.apache.org/jira/browse/SQOOP

Jarcec

On Thu, Jun 27, 2013 at 02:57:49PM +0800, sam liu wrote:
> Hi,
>
> when failed to import a non-existing table, the returned failure
> information includes java.lang.NullPointerException and other exceptions
> which customer does not care about. These exception might confuse
> customers, and we only need to return them 'ERROR manager.SqlManager: Error
> executing statement: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL
> Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2ADMIN.DB2TEST_TBL1001,
> DRIVER=4.12.55' in this case. Can we make any improvement?
>
>
> a) command:
> sqoop import --connect jdbc:db2://hostname:50000/SAMPLE --table
> DB2ADMIN.DB2TEST_TBL1001 --username sam --password pwd -m 1 --target-dir
> /tmp/DB2TEST_TBL001_0620_f
>
> b) result:
> 13/06/26 22:39:50 WARN tool.BaseSqoopTool: Setting your password on the
> command-line is insecure. Consider using -P instead.
> 13/06/26 22:39:50 INFO manager.SqlManager: Using default fetchSize of 1000
> 13/06/26 22:39:50 INFO tool.CodeGenTool: Beginning code generation
> 13/06/26 22:39:53 INFO manager.SqlManager: Executing SQL statement: SELECT
> t.* FROM DB2ADMIN.DB2TEST_TBL1001 AS t WHERE 1=0
> 13/06/26 22:39:53 ERROR manager.SqlManager: Error executing statement:
> com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204,
> SQLSTATE=42704, SQLERRMC=DB2ADMIN.DB2TEST_TBL1001, DRIVER=4.12.55
> com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204,
> SQLSTATE=42704, SQLERRMC=DB2ADMIN.DB2TEST_TBL1001, DRIVER=4.12.55
>         at com.ibm.db2.jcc.am.hd.a(hd.java:676)
>         at com.ibm.db2.jcc.am.hd.a(hd.java:60)
>         at com.ibm.db2.jcc.am.hd.a(hd.java:127)
>         at com.ibm.db2.jcc.am.mn.c(mn.java:2621)
>         at com.ibm.db2.jcc.am.mn.d(mn.java:2609)
>         at com.ibm.db2.jcc.am.mn.a(mn.java:2085)
>         at com.ibm.db2.jcc.am.nn.a(nn.java:7054)
>         at com.ibm.db2.jcc.t4.cb.g(cb.java:141)
>         at com.ibm.db2.jcc.t4.cb.a(cb.java:41)
>         at com.ibm.db2.jcc.t4.q.a(q.java:32)
>         at com.ibm.db2.jcc.t4.rb.i(rb.java:135)
>         at com.ibm.db2.jcc.am.mn.ib(mn.java:2055)
>         at com.ibm.db2.jcc.am.nn.rc(nn.java:3219)
>         at com.ibm.db2.jcc.am.nn.b(nn.java:4002)
>         at com.ibm.db2.jcc.am.nn.ec(nn.java:728)
>         at com.ibm.db2.jcc.am.nn.executeQuery(nn.java:698)
>         at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:539)
>         at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:548)
>         at
> org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:191)
>         at
> org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:175)
>         at
> org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:262)
>         at
> org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1235)
>         at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1060)
>         at
> org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82)
>         at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:390)
>         at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:476)
>         at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>         at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
>         at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
>         at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
>         at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
>         at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)
> 13/06/26 22:39:53 INFO manager.SqlManager: Executing SQL statement: SELECT
> t.* FROM DB2ADMIN.DB2TEST_TBL1001 AS t WHERE 1=0
> 13/06/26 22:39:53 ERROR manager.SqlManager: Error executing statement:
> com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204,