sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Khatri <chetan.opensou...@gmail.com>
Subject Re: Running two Sqoop commands from Spark Job
Date Thu, 29 Aug 2019 19:48:49 GMT
And Sometime, It gives below error

 2019-08-29 19:43:41,909 FATAL [main] org.apache.hadoop.mapred.YarnChild:
Error running child : java.lang.ClassFormatError: Extra bytes at the end of
class file QueryResult

        at java.lang.ClassLoader.defineClass1(Native Method)

        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)

        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

        at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)

        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)

        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)

        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Class.java:348)

        at
org.apache.hadoop.conf.Configuration.getClassByNameOrNull(Configuration.java:2247)

        at
org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2212)

        at
org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2306)

        at
org.apache.sqoop.mapreduce.db.DBConfiguration.getInputClass(DBConfiguration.java:401)

        at
org.apache.sqoop.mapreduce.db.SQLServerDBInputFormat.createDBRecordReader(SQLServerDBInputFormat.java:54)

        at
org.apache.sqoop.mapreduce.db.DBInputFormat.createRecordReader(DBInputFormat.java:263)

        at
org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.<init>(MapTask.java:515)

        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:758)

        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)

        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:170)

        at java.security.AccessController.doPrivileged(Native Method)

        at javax.security.auth.Subject.doAs(Subject.java:422)

        at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1869)

        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164)




On Fri, Aug 30, 2019 at 1:09 AM Chetan Khatri <chetan.opensource@gmail.com>
wrote:

> Hi Sqoop Users,
>
> I am running Sqoop commands from from a Spark Job, Sometime it is getting
> success and sometime it's failing;
>
> I am keep getting this exception; Can you please help me to point on cause
> and solution. Thanks
>
> 2019-08-28 16:43:21,064 ERROR [main]
> org.apache.sqoop.mapreduce.db.DBRecordReader: Top level exception:
>
> com.microsoft.sqlserver.jdbc.SQLServerException: An error occurred while
> converting the nvarchar value to JDBC data type INTEGER.
>
>         at
> com.microsoft.sqlserver.jdbc.DDC.convertStreamToObject(DDC.java:653)
>
>         at
> com.microsoft.sqlserver.jdbc.ServerDTVImpl.getValue(dtv.java:4053)
>
>         at com.microsoft.sqlserver.jdbc.DTV.getValue(dtv.java:226)
>
>         at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:144)
>
>         at
> com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2099)
>
>         at
> com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2084)
>
>         at
> com.microsoft.sqlserver.jdbc.SQLServerResultSet.getInt(SQLServerResultSet.java:2327)
>
>         at
> org.apache.sqoop.lib.JdbcWritableBridge.readInteger(JdbcWritableBridge.java:49)
>
>         at QueryResult.readFields(QueryResult.java:226)
>
>         at
> org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:242)
>
>         at
> org.apache.sqoop.mapreduce.db.SQLServerDBRecordReader.nextKeyValue(SQLServerDBRecordReader.java:178)
>
>         at
> org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:556)
>
>         at
> org.apache.hadoop.mapreduce.task.MapContextImpl.nextKeyValue(MapContextImpl.java:80)
>
>         at
> org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.nextKeyValue(WrappedMapper.java:91)
>
>         at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
>
>         at
> org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:64)
>
>         at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
>
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
>
>         at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:170)
>
>         at java.security.AccessController.doPrivileged(Native Method)
>
>         at javax.security.auth.Subject.doAs(Subject.java:422)
>
>         at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1869)
>
>         at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164)
>
> Caused by: java.lang.NumberFormatException: For input string: "company"
>
>         at
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>
>         at java.lang.Integer.parseInt(Integer.java:580)
>
>         at java.lang.Integer.valueOf(Integer.java:766)
>
>         at
> com.microsoft.sqlserver.jdbc.DDC.convertStringToObject(DDC.java:465)
>
>         at
> com.microsoft.sqlserver.jdbc.DDC.convertStreamToObject(DDC.java:616)
>
>         ... 22 more
>
> 2019-08-28 16:43:21,071 WARN [main]
> org.apache.sqoop.mapreduce.db.SQLServerDBRecordReader: Trying to recover
> from DB read failure:
>
> java.io.IOException: SQLException in nextKeyValue
>
>         at
> org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:275)
>
>         at
> org.apache.sqoop.mapreduce.db.SQLServerDBRecordReader.nextKeyValue(SQLServerDBRecordReader.java:178)
>
>         at
> org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:556)
>
>         at
> org.apache.hadoop.mapreduce.task.MapContextImpl.nextKeyValue(MapContextImpl.java:80)
>
>         at
> org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.nextKeyValue(WrappedMapper.java:91)
>
>         at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
>
>         at
> org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:64)
>
>         at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
>
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
>
>         at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:170)
>
>         at java.security.AccessController.doPrivileged(Native Method)
>
>         at javax.security.auth.Subject.doAs(Subject.java:422)
>
>         at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1869)
>
>         at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164)
>
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: An error
> occurred while converting the nvarchar value to JDBC data type INTEGER.
>
>         at
> com.microsoft.sqlserver.jdbc.DDC.convertStreamToObject(DDC.java:653)
>
>         at
> com.microsoft.sqlserver.jdbc.ServerDTVImpl.getValue(dtv.java:4053)
>
>         at com.microsoft.sqlserver.jdbc.DTV.getValue(dtv.java:226)
>
>         at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:144)
>
>         at
> com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2099)
>
>         at
> com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2084)
>
>         at
> com.microsoft.sqlserver.jdbc.SQLServerResultSet.getInt(SQLServerResultSet.java:2327)
>
>         at
> org.apache.sqoop.lib.JdbcWritableBridge.readInteger(JdbcWritableBridge.java:49)
>
>         at QueryResult.readFields(QueryResult.java:226)
>
>         at
> org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:242)
>
>         ... 13 more
>
> Caused by: java.lang.NumberFormatException: For input string: "company"
>
>         at
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>

Mime
View raw message