<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101373#M64338</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/393/aervits.html" nodeid="393"&gt;@Artem Ervits&lt;/A&gt; I never got sqoop's hive-import to work in an Oozie workflow, so I came up with a workaround instead. Will provide my workaround as an answer. Thanks. &lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2016 09:56:06 GMT</pubDate>
    <dc:creator>latorres</dc:creator>
    <dc:date>2016-02-03T09:56:06Z</dc:date>
    <item>
      <title>Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101369#M64334</link>
      <description>&lt;P&gt;I'm trying to test Oozie's Sqoop action in the following environment:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;HDP2.3.2&lt;/LI&gt;&lt;LI&gt;Sqoop 1.4.6&lt;/LI&gt;&lt;LI&gt;Oozie 4.2.0&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Via the command line, the following sqoop command works:&lt;/P&gt;&lt;PRE&gt;sqoop import \
	-D mapred.task.timeout=0 \
	--connect jdbc:sqlserver://x.x.x.x:1433;database=CEMHistorical \
 	--table MsgCallArrival \
	--username hadoop \
	--password-file hdfs:///user/sqoop/.adg.password \
	--hive-import \
	--create-hive-table \
	--hive-table develop.oozie \
	--split-by TimeStamp \
	--map-column-hive Call_ID=STRING,Stream_ID=STRING
&lt;/PRE&gt;&lt;P&gt;But when I try to execute the same command via Oozie, I'm running into &lt;STRONG&gt;java.io.IOException: No columns to generate for ClassWriter&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Below are my `job.properties` and `workflow.xml`:&lt;/P&gt;&lt;PRE&gt;nameNode=hdfs://host.vitro.com:8020
jobTracker=host.vitro.com:8050
projectRoot=${nameNode}/user/${user.name}/tmp/sqoop-test/
oozie.use.system.libpath=true
oozie.wf.application.path=${projectRoot}



&amp;lt;workflow-app name="sqoop-test-wf" xmlns="uri:oozie:workflow:0.4"&amp;gt;
    &amp;lt;start to="sqoop-import"/&amp;gt;

    &amp;lt;action name="sqoop-import" retry-max="10" retry-interval="1"&amp;gt;
        &amp;lt;sqoop xmlns="uri:oozie:sqoop-action:0.2"&amp;gt;
            &amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt;
            &amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt;
        &amp;lt;command&amp;gt;import -D mapred.task.timeout=0 --connect jdbc:sqlserver://x.x.x.x:1433;database=CEMHistorical --table MsgCallArrival --username hadoop --password-file hdfs:///user/sqoop/.adg.password --hive-import --create-hive-table --hive-table develop.oozie --split-by TimeStamp --map-column-hive Call_ID=STRING,Stream_ID=STRING&amp;lt;/command&amp;gt;
        &amp;lt;/sqoop&amp;gt;
        &amp;lt;ok to="end"/&amp;gt;
        &amp;lt;error to="errorcleanup"/&amp;gt;
    &amp;lt;/action&amp;gt;
    &amp;lt;kill name="errorcleanup"&amp;gt;
      &amp;lt;message&amp;gt;Sqoop Test WF failed. [${wf:errorMessage(wf:lastErrorNode())}]&amp;lt;/message&amp;gt;
    &amp;lt;/kill&amp;gt;
    &amp;lt;end name ="end"/&amp;gt;
&amp;lt;/workflow-app&amp;gt;&lt;/PRE&gt;&lt;P&gt;I've attached the full log, but here's an excerpt:&lt;/P&gt;&lt;PRE&gt;2016-01-05 11:29:21,415 ERROR [main] tool.ImportTool (ImportTool.java:run(613)) - Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter
    at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1651)
    at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
    at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
    at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
    at org.apache.sqoop.Sqoop.run(Sqoop.java:148)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:184)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:226)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:235)
    at org.apache.sqoop.Sqoop.main(Sqoop.java:244)
    at org.apache.oozie.action.hadoop.SqoopMain.runSqoopJob(SqoopMain.java:197)
    at org.apache.oozie.action.hadoop.SqoopMain.run(SqoopMain.java:177)
    at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:47)
    at org.apache.oozie.action.hadoop.SqoopMain.main(SqoopMain.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:236)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
    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:1657)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)&lt;/PRE&gt;&lt;P&gt;I've been struggling with this problem for quite some time now, any help would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 11:38:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101369#M64334</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-01-05T11:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101370#M64335</link>
      <description>&lt;P&gt;This error "No columns to generate forClassWriter" is thrown when no results are retrieved by the command. &lt;/P&gt;&lt;P&gt;So there is something wrong with the command. It appears that it could be the jdbc url. &lt;/P&gt;&lt;P&gt;As per &lt;A href="https://msdn.microsoft.com/en-us/library/ms378428%28v=sql.110%29.aspx"&gt;MSDN&lt;/A&gt;, the correct syntax for named database uses the term "databaseName" and not "database" (like you have it in the snippet above). So try changing that. &lt;/P&gt;&lt;PRE&gt;Connect to a named database on a remote server:

jdbc:sqlserver://localhost;databaseName=AdventureWorks;integratedSecurity=true;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Jan 2016 11:45:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101370#M64335</guid>
      <dc:creator>bsaini</dc:creator>
      <dc:date>2016-01-05T11:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101371#M64336</link>
      <description>&lt;P&gt;I tried your suggestion but I'm still getting the same result. In any case, I don't think it could have been the connection URL because as I mentioned above, the command works when used via command-line. It's just when I use it with Oozie that I encounter this error.&lt;/P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/191/bsaini.html" nodeid="191"&gt;&lt;/A&gt;</description>
      <pubDate>Tue, 05 Jan 2016 13:20:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101371#M64336</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-01-05T13:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101372#M64337</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1196/latorres.html" nodeid="1196"&gt;@Luis Antonio Torres&lt;/A&gt; has this been resolved? Can you provide your solution or accept the best answer?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 09:47:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101372#M64337</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-03T09:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101373#M64338</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/393/aervits.html" nodeid="393"&gt;@Artem Ervits&lt;/A&gt; I never got sqoop's hive-import to work in an Oozie workflow, so I came up with a workaround instead. Will provide my workaround as an answer. Thanks. &lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 09:56:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101373#M64338</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-02-03T09:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101374#M64339</link>
      <description>&lt;P&gt;At the same time that I was getting this issue, I was also dealing with a &lt;A target="_blank" href="https://community.hortonworks.com/questions/10300/sqoop-importing-from-sql-server-throwing-the-tcpip.html"&gt;network issue&lt;/A&gt; when trying to issue Sqoop commands via CLI. Although the network issue was resolved and I stopped seeing this IOException, I kept running into new errors that I never managed to resolve.&lt;/P&gt;&lt;P&gt;In the end, I decided to work around it by breaking the hive import into a 2-step workflow:&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;sqoop action to import into HDFS&lt;/LI&gt;&lt;LI&gt;hive action to load data from HDFS into hive&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;UPDATE:&lt;/P&gt;&lt;P&gt;It turns out that the "new errors" was because the "yarn" user doesn't belong to the "hdfs" group and so couldn't perform the hive-import part. Adding this use to the group allows me now to use hive-import in my worfklows instead of the 2-step workflow I used before.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 10:03:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101374#M64339</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-02-03T10:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101375#M64340</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1196/latorres.html" nodeid="1196"&gt;@Luis Antonio Torres&lt;/A&gt; I have a couple of examples with sqoop and hive. Here they are. Here's &lt;A href="https://github.com/dbist/oozie/tree/master/apps/hcatalog"&gt;hcatalog&lt;/A&gt; example, so you can use either hive or pig script to execute hcat commands and here's a &lt;A href="https://github.com/dbist/oozie/tree/master/apps/sqoopshell"&gt;sqoop&lt;/A&gt; command in shell action, also can be mixed with hive actions.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 10:13:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101375#M64340</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-03T10:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101376#M64341</link>
      <description>&lt;P&gt;As far as I see sqoop action above, I don't see hive-site.xml file. I guess you added it into lib directory in the deployment directory, which will keep Hive action from running and it gives you error something like hive-site.xml permssion error. You should add the hive-site.xml file  in "Files" in the Sqoop action.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 23:42:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101376#M64341</guid>
      <dc:creator>shigeru_takehar</dc:creator>
      <dc:date>2016-02-03T23:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101377#M64342</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1646/shigerutakehara.html" nodeid="1646"&gt;@Shigeru Takehara&lt;/A&gt; I did try adding hive-site.xml and placed it in the root of the workflow directory on HDFS, but I was running into the error and the error message in the logs is this:&lt;/P&gt;&lt;PRE&gt;ERROR [main] tool.ImportTool (ImportTool.java:run(613)) - Encountered IOException running import job: java.io.IOException: Hive exited with status 1&lt;/PRE&gt;&lt;P&gt;I eventually had to go with my workaround because I couldn't get hive import to work and I had deadlines to meet. I'd still like to try and get hive import to work though&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 08:33:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101377#M64342</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-02-04T08:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101378#M64343</link>
      <description>&lt;P&gt;Where did you copy your jdbc driver for Sqoop action?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 11:04:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101378#M64343</guid>
      <dc:creator>shigeru_takehar</dc:creator>
      <dc:date>2016-02-04T11:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101379#M64344</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/1646/shigerutakehara.html" nodeid="1646"&gt;@Shigeru Takehara&lt;/A&gt;, the jdbc driver was in the Oozie sharelib. Also, the import was working fine - I see the data within HDFS. It's just the loading into Hive that fails. That's why I just opted to break the import into two separate steps.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 14:17:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101379#M64344</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-02-09T14:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop action throwing java.io.IOException: No columns to generate for ClassWriter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101380#M64345</link>
      <description>&lt;P&gt;The Sqoop error 'No columns to generate' could also occur if your sqoop job is unable to determine a driver to use for this job. Try adding --driver com.sqlserver.jdbc.Driver  along with the rest of your sqoop import parameters. Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 02:45:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-action-throwing-java-io-IOException-No-columns/m-p/101380#M64345</guid>
      <dc:creator>roney_jose</dc:creator>
      <dc:date>2016-03-16T02:45:18Z</dc:date>
    </item>
  </channel>
</rss>

