sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyril Bogus <cyrilbo...@gmail.com>
Subject Re: Export
Date Fri, 26 Apr 2013 18:57:45 GMT
Thank you for the reply earier again.
You were right but, I updated my sqoop to 1.4.3 and made some changes to my
export query,
I have now the following error.

Exception in thread "main" java.lang.NoClassDefFoundError:
com/cloudera/sqoop/mapreduce/UpdateOutputFormat$UpdateRecordWriter
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
    at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:266)
    at
org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:820)
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:865)
    at
org.apache.hadoop.mapreduce.JobContext.getOutputFormatClass(JobContext.java:235)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:884)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:416)
    at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
    at
org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850)
    at org.apache.hadoop.mapreduce.Job.submit(Job.java:500)
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530)
    at
org.apache.sqoop.mapreduce.ExportJobBase.doSubmitJob(ExportJobBase.java:288)
    at
org.apache.sqoop.mapreduce.ExportJobBase.runJob(ExportJobBase.java:265)
    at
org.apache.sqoop.mapreduce.ExportJobBase.runExport(ExportJobBase.java:375)
    at
com.microsoft.sqoop.SqlServer.MSSQLServerManager.updateTable(MSSQLServerManager.java:165)
    at org.apache.sqoop.tool.ExportTool.exportTable(ExportTool.java:71)
    at org.apache.sqoop.tool.ExportTool.run(ExportTool.java:100)
    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)
Caused by: java.lang.ClassNotFoundException:
com.cloudera.sqoop.mapreduce.UpdateOutputFormat$UpdateRecordWriter
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    ... 36 more


Apparently it is now looking for a class that do not exist. I checked the
source and indeed UpdateRecordWrite does not exist


On Fri, Apr 26, 2013 at 1:52 PM, Cyril Bogus <cyrilbogus@gmail.com> wrote:

> Here is the sqoop log
>
> 13/04/26 13:36:46 WARN tool.SqoopTool: $SQOOP_CONF_DIR has not been set in
> the environment. Cannot check for additional configuration.
> 13/04/26 13:36:46 WARN sqoop.ConnFactory: $SQOOP_CONF_DIR has not been set
> in the environment. Cannot check for additional configuration.
> 13/04/26 13:36:46 INFO manager.SqlManager: Using default fetchSize of 1000
> 13/04/26 13:36:46 INFO tool.CodeGenTool: Beginning code generation
> 13/04/26 13:36:46 INFO manager.SqlManager: Executing SQL statement: SELECT
> t.* FROM [kmeansclusterIds] AS t WHERE 1=0
> 13/04/26 13:36:46 INFO orm.CompilationManager: $HADOOP_HOME is not set
> /tmp/sqoop-cyrille/compile/2a3ab7b9299edcac783039a7addc9666/kmeansclusterIds.java:73:
> cannot find symbol
>
> symbol  : variable driver_license
> location: class kmeansclusterIds
>     JdbcWritableBridge.writeString(driver_license, 2 + __off, 12,
> __dbStmt);
>                                    ^
> Note:
> /tmp/sqoop-cyrille/compile/2a3ab7b9299edcac783039a7addc9666/kmeansclusterIds.java
> uses or overrides a deprecated API.
>
> Note: Recompile with -Xlint:deprecation for details.
> 1 error
> 13/04/26 13:36:47 ERROR tool.ExportTool: Encountered IOException running
> export job: java.io.IOException: Error returned by javac
>
> the kmeansClusterId class is set in a temp file so I cannot show what the
> class do beside the point of error as stated above.
>
> Thank you for your reply Jarek
>
>
> On Fri, Apr 26, 2013 at 1:38 PM, Jarek Jarcec Cecho <jarcec@apache.org>wrote:
>
>> Hi Cyril,
>> would you mind sharing entire Sqoop log and the generated java class?
>>
>> Jarcec
>>
>> On Fri, Apr 26, 2013 at 12:53:49PM -0400, Cyril Bogus wrote:
>> > UPDATE!!!
>> >
>> > Now I get the following error
>> >
>> >
>> /tmp/sqoop-cyril/compile/b156fd4f270274b11320d007472bbfe7/kmeansclusterIds.java:73:
>> > cannot find symbol
>> > symbol  : variable driver_license
>> > location: class kmeansclusterIds
>> >     JdbcWritableBridge.writeString(driver_license, 2 + __off, 12,
>> __dbStmt);
>> >                                    ^
>> > Note:
>> >
>> /tmp/sqoop-cyrille/compile/b156fd4f270274b11320d007472bbfe7/kmeansclusterIds.java
>> > uses or overrides a deprecated API.
>> > Note: Recompile with -Xlint:deprecation for details.
>> > 1 error
>> > 13/04/26 12:52:26 ERROR tool.ExportTool: Encountered IOException running
>> > export job: java.io.IOException: Error returned by javac
>> >
>> >
>> >
>> >
>> > On Fri, Apr 26, 2013 at 12:52 PM, Cyril Bogus <cyrilbogus@gmail.com>
>> wrote:
>> >
>> > > Hi everyone,
>> > >
>> > > I am trying to do an export from HDFS to MSSQL using Sqoop
>> > >
>> > > my data is in the following format
>> > >
>> > > JTDKN3DU0B0261494,345
>> > > JTEBU14R840022700,340
>> > > JTEEP21A770208029,314
>> > > JTHBF5C24A5125359,348
>> > > jthbk1eg6a2395028,341
>> > > JTMBD31V565007305,355
>> > > KL1PM5C5XAK700838,352
>> > > KMHCG45C41U225885,352
>> > > KMHDC86EX9U037746,304
>> > > NM0LS6BN8CT123712,354
>> > >
>> > > my export statement is the following
>> > >
>> > > export
>> > > --connect
>> > > 'jdbc:sqlserver://server:port;username=sa;password=pass;database=db'
>> > > --table
>> > > kmeansclusterIds
>> > > --update-key
>> > > driver_license
>> > > --columns
>> > > clusterId
>> > > --update-mode
>> > > allowinsert
>> > > --export-dir
>> > > drivers/output.txt
>> > > --fields-terminated-by
>> > > ','
>> > > --lines-terminated-by
>> > > \n
>> > >
>> > > I created a table named kmeansclusterIds on the server.
>> > > I get the following error:
>> > >
>> > > Exception in thread "main" java.lang.NoSuchMethodError:
>> > >
>> com.cloudera.sqoop.manager.ExportJobContext.setConnManager(Lcom/cloudera/sqoop/manager/ConnManager;)V
>> > >     at
>> > >
>> com.microsoft.sqoop.SqlServer.MSSQLServerManager.exportTable(MSSQLServerManager.java:151)
>> > >     at
>> org.apache.sqoop.tool.ExportTool.exportTable(ExportTool.java:78)
>> > >     at org.apache.sqoop.tool.ExportTool.run(ExportTool.java:97)
>> > >     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)
>> > >
>> > > Any insight in what the real issue might be?
>> > >
>> > > Thank you in advance for a reply.
>> > >
>>
>
>

Mime
View raw message