title: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/util/JSON
body: <p>I am trying to connect MongoDb with Hadoop. I have Hadoop-1.2.1 installed in my Ubuntu 14.04. I installed MongoDB-3.0.4 and also downloaded and added <code>mongo-hadoop-hive-1.3.0.jar</code>, <code>mongo-java-driver-2.13.2.jar</code> jars in hive session. I have downloaded <code>mongo-connector.sh</code> (found in this <a href="http://www.rackspace.com/blog/mongodb-and-hadoop-connect-your-data/" rel="nofollow">site</a>)and included it under Hadoop_Home/lib. </p>
  
  <p>I have set input and output sources like this :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>hive&gt; set MONGO_INPUT=mongodb://[user:password@]&lt;MongoDB Instance IP&gt;:27017/DBname.collectionName;
  hive&gt; set MONGO_OUTPUT=mongodb://[user:password@]&lt;MongoDB Instance IP&gt;:27017/DBname.collectionName;
  hive&gt; add JAR brickhouse-0.7.0.jar;
  hive&gt; create temporary function collect as 'brickhouse.udf.collect.CollectUDAF';</code></pre>
  </div>
  </div>
  </p>
  
  <p>My collection in MongoDb is this :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&gt; db.shows.find()
  { "_id" : ObjectId("559eb22fa7999b1a5f50e4e6"), "title" : "Arrested Development", "airdate" : "November 2, 2003", "network" : "FOX" }
  { "_id" : ObjectId("559eb238a7999b1a5f50e4e7"), "title" : "Stella", "airdate" : "June 28, 2005", "network" : "Comedy Central" }
  { "_id" : ObjectId("559eb23ca7999b1a5f50e4e8"), "title" : "Modern Family", "airdate" : "September 23, 2009", "network" : "ABC" }
  &gt; </code></pre>
  </div>
  </div>
  </p>
  
  <p>Now I am trying to create a Hive table </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>CREATE EXTERNAL TABLE mongoTest(title STRING,network STRING)
      &gt; STORED BY 'com.mongodb.hadoop.hive.MongoStorageHandler'
      &gt; WITH SERDEPROPERTIES('mongo.columns.mapping'='{"title":"name",”airdate”:”date”,”network”:”name”}')
      &gt; TBLPROPERTIES('mongo.uri'='${hiveconf:MONGO_INPUT}');</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I run this command, it says </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/util/JSON</code></pre>
  </div>
  </div>
  </p>
  
  <p>Then I added <code>hive-json-serde.jar</code> and <code>hive-serdes-1.0-SNAPSHOT.jar</code> jars and tried to create the table again. But the error remains the same. How can I rectify this error?</p>