title: Solr - DataImportHandler Not Working
body: <p>I've simple <code>DataImportHandler</code>, that is working on my local system and not on my Server. Both the versions of Solr are same i.e <strong>Solr 4.6.0</strong>.</p>
  
  <p>I've tried these configurations for DataImportHandler:</p>
  
  <p><strong>Configuration 1:</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;dataConfig&gt;
      &lt;dataSource type="JdbcDataSource"
                  driver="org.postgresql.Driver"
                  url="jdbc:postgresql://HOST:5432/mydb"
                  user="admin"
                  password="admin" /&gt;
  
      &lt;script&gt;&lt;![CDATA[
                  function generate_resource_uri(row)        {
                      row.put('resource_uri', '/api/v1/product/' + row.get('id') + '/');
                      return row;
                  }
          ]]&gt;&lt;/script&gt;
  
      &lt;document&gt;
          &lt;entity name="products_product"
                  query="SELECT id, image_url, impression_url, product_url, manufacturer_name, discount_percentage, short_description, merchant_name, product_name, sku, long_description, date_modified, merchant_id, commission, keywords, product_id, retail_price, date_created FROM products_product"
                  transformer="script:generate_resource_uri" &gt;
  
              &lt;entity name="source" query="select title from products_source where id = '${products_product.id}'"
                      processor="CachedSqlEntityProcessor"&gt;
                  &lt;field column="title" name="source"/&gt;
              &lt;/entity&gt;
  
              &lt;entity name="currency" query="select code from products_currency where id = '${products_product.id}'"
                      processor="CachedSqlEntityProcessor"&gt;
                  &lt;field column="code" name="currency"/&gt;
              &lt;/entity&gt;
  
              &lt;entity name="category" query="select title from products_category where id = '${products_product.id}'"
                      processor="CachedSqlEntityProcessor"&gt;
                  &lt;field column="title" name="category"/&gt;
              &lt;/entity&gt;
  
          &lt;/entity&gt;
      &lt;/document&gt;
  &lt;/dataConfig&gt;
  </code></pre>
  
  <p><strong>Configuration 2:</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;dataConfig&gt;
      &lt;dataSource type="JdbcDataSource"
                  driver="org.postgresql.Driver"
                  url="jdbc:postgresql://HOST:5432/mydb"
                  user="admin"
                  password="123456"/&gt;
  
      &lt;script&gt;&lt;![CDATA[
                  function generate_resource_uri(row)        {
                      row.put('resource_uri', '/api/v1/product/' + row.get('id') + '/');
                      return row;
                  }
          ]]&gt;&lt;/script&gt;
  
      &lt;document&gt;
          &lt;entity name="products_product"
                  query="SELECT id, image_url, impression_url, product_url, manufacturer_name, discount_percentage, short_description, merchant_name, product_name, sku, long_description, date_modified, merchant_id, commission, keywords, product_id, retail_price, date_created FROM products_product"
                  transformer="script:generate_resource_uri" &gt;
  
              &lt;entity name="source" query="select title from products_source where id = '${products_product.id}'"
                      cachePk="id" cacheLookup="products_product.id" cacheImpl="SortedMapBackedCache"&gt;
                  &lt;field column="title" name="source"/&gt;
              &lt;/entity&gt;
  
              &lt;entity name="currency" query="select code from products_currency where id = '${products_product.id}'"
                      cachePk="id" cacheLookup="products_product.id" cacheImpl="SortedMapBackedCache"&gt;
                  &lt;field column="code" name="currency"/&gt;
              &lt;/entity&gt;
  
              &lt;entity name="category" query="select title from products_category where id = '${products_product.id}'"
                      cachePk="id" cacheLookup="products_product.id" cacheImpl="SortedMapBackedCache"&gt;
                  &lt;field column="title" name="category"/&gt;
              &lt;/entity&gt;
  
          &lt;/entity&gt;
      &lt;/document&gt;
  &lt;/dataConfig&gt;
  </code></pre>
  
  <p>Locally I've have approx 2K rows, which is indexed properly, and all the child entity show up. 
  On server, the fields from the child entities are not showing up i.e source, category and currency. The server has approx 6M rows, its a silly doubt but I hope that memory is not the issue. My server is running on m1.medium EC2 instance, Ubuntu 12.04LTS.</p>
  
  <p>Thanks in Advance :)</p>