Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # dev >> An issue of importing a table from DB2 Luw 97 database using Sqoop 1.4.1


Copy link to this message
-
An issue of importing a table from DB2 Luw 97 database using Sqoop 1.4.1
Hi,

I have an issue of importing a table from DB2 Luw 97 database using Sqoop.
Below is the logs. Could any one help me? Thanks in advance very much!
[root@localhost bin]# ./sqoop import --connect jdbc:db2://9.1111.146.111:
50000/SAMPLE --table DB2ADMIN.DB2TEST_TBL003 --username sam --password
db2adminpassword -m 1
Warning: /usr/lib/hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
12/05/22 23:35:56 WARN tool.BaseSqoopTool: Setting your password on the
command-line is insecure. Consider using -P instead.
12/05/22 23:35:56 INFO manager.SqlManager: Using default fetchSize of 1000
12/05/22 23:35:56 INFO tool.CodeGenTool: Beginning code generation
12/05/22 23:35:59 INFO manager.SqlManager: Executing SQL statement: SELECT
t.* FROM DB2ADMIN.DB2TEST_TBL003 AS t WHERE 1=0
12/05/22 23:35:59 INFO manager.SqlManager: Executing SQL statement: SELECT
t.* FROM DB2ADMIN.DB2TEST_TBL003 AS t WHERE 1=0
12/05/22 23:35:59 INFO orm.CompilationManager: HADOOP_HOME is
/opt/hadoop-0.20.2/bin/..
12/05/22 23:35:59 INFO orm.CompilationManager: Found hadoop core jar at:
/opt/hadoop-0.20.2/bin/../hadoop-0.20.2-core.jar
Note:
/tmp/sqoop-root/compile/56c3a2cc91c28bad8d66ca7b80e997d0/DB2ADMIN_DB2TEST_TBL003.java
uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
12/05/22 23:35:59 INFO orm.CompilationManager: Writing jar file:
/tmp/sqoop-root/compile/56c3a2cc91c28bad8d66ca7b80e997d0/DB2ADMIN.DB2TEST_TBL003.jar
12/05/22 23:35:59 INFO mapreduce.ImportJobBase: Beginning import of
DB2ADMIN.DB2TEST_TBL003
12/05/22 23:36:55 INFO manager.SqlManager: Executing SQL statement: SELECT
t.* FROM DB2ADMIN.DB2TEST_TBL003 AS t WHERE 1=0
12/05/22 23:37:00 INFO mapred.JobClient: Running job: job_201205222335_0001
12/05/22 23:37:01 INFO mapred.JobClient:  map 0% reduce 0%
12/05/22 23:37:16 INFO mapred.JobClient: Task Id :
attempt_201205222335_0001_m_000000_0, Status : FAILED
java.io.IOException: SQLException in nextKeyValue
        at
org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:265)
        at
org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:423)
        at
org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)
        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)
        at
org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:183)
        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
        at org.apache.hadoop.mapred.Child.main(Child.java:170)
Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error:
SQLCODE=-104, SQLSTATE=42601, SQLERRMC=.;T_TBL003 AS DB2ADMIN;,,
DRIVER=3.62.56
        at com.ibm.db2.jcc.am.fd.a(fd.java:676)
        at com.ibm.db2.jcc.am.fd.a(fd.java:60)
        at com.ibm.db2.jcc.am.fd.a(fd.java:127)
        at com.ibm.db2.jcc.am.jn.c(jn.java:2614)
        at com.ibm.db2.jcc.am.jn.d(jn.java:2602)
        at com.ibm.db2.jcc.am.jn.a(jn.java:2094)
        at com.ibm.db2.jcc.am.kn.a(kn.java:6720)
        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.jn.gb(jn.java:2064)
        at com.ibm.db2.jcc.am.kn.pc(kn.java:3214)
        at com.ibm.db2.jcc.am.kn.b(kn.java:3999)
        at com.ibm.db2.jcc.am.kn.cc(kn.java:709)
        at com.ibm.db2.jcc.am.kn.executeQuery(kn.java:683)
        at
org.apache.sqoop.mapreduce.db.DBRecordReader.executeQuery(DBRecordReader.java:111)
        at
org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:236)
        ... 7 more

12/05/22 23:37:22 INFO mapred.JobClient: Task Id :
attempt_201205222335_0001_m_000000_1, Status : FAILED
java.io.IOException: SQLException in nextKeyValue
        at
org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:265)
        at
org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:423)
        at
org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)
        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)
        at
org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:183)
        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
        at org.apache.hadoop.mapred.Child.main(Child.java:170)
Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error:
SQLCODE=-104, SQLSTATE=42601, SQLERRMC=.;T_TBL003 AS DB2ADMIN;,,
DRIVER=3.62.56
        at com.ibm.db2.jcc.am.fd.a(fd.java:676)
        at com.ibm.db2.jcc.am.fd.a(fd.java:60)
        at com.ibm.db2.jcc.am.fd.a(fd.java:127)
        at com.ibm.db2.jcc.am.jn.c(jn.java:2614)
        at com.ibm.db2.jcc.am.jn.d(jn.java:2602)
        at com.ibm.db2.jcc.am.jn.a(jn.java:2094)
        at com.ibm.db2.jcc.am.kn.a(kn.java:6720)
        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.jn.gb(jn.java:2064)
        at com.ibm.db2.jcc.am.kn.pc(kn.java:3214)
        at com.ibm.db2.jcc.am.kn.b(kn.java:3999)
        at com.ibm.db2.jcc.am.kn.cc(kn.java:709)
        at com.ibm.db2.jcc.am.kn.executeQuery(kn.java:683)
        at
org.apache.sqoop.mapreduce.db.DBRecordReader.executeQuery(DBRecordReader.java:111)
        at
org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:236)
        ... 7 more

12/05/22 23:37:29 INFO mapred.JobClient: Task Id :
attempt_201205222335_0001_m_000000_2, Status : FAILED
java.io.IOException: SQLException in nextKeyValue
        at
org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:265)
        at
org.apache.hadoop.ma
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB