[ 
https://issues.apache.org/jira/browse/SOLR-7498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Swoorup Joshi updated SOLR-7498:
--------------------------------
           Description: 
Using the solrj client to upload the file for indexing causing an SolrException 
error in solrj uploading to solr server. This only occurs when using the solrj 
client. 

Using the solr's own post tool it just works fine as the stream_size is set to 
a numeric value

I am using the following code

ContentStreamUpdateRequest req = new 
ContentStreamUpdateRequest("/update/extract");
ContentStreamBase.FileStream fs = new FileStream(new File(filename));
req.setWaitSearcher(false);
req.setMethod(METHOD.POST );
req.addContentStream(fs);
req.setParam("literal.id", filename);
req.setParam("resource.name", filename);
NamedList<Object> result = this.mHttpSolrClient.request(req);

In Solr server, I receive the following message:

4767120 [qtp559670971-21] INFO  
org.apache.solr.update.processor.LogUpdateProcessor  [   test] – [test] 
webapp=/solr path=/update/extract 
params={waitSearcher=false&resource.name=/tmp/RUNNING.txt&literal.id=/tmp/RUNNING.txt&wt=javabin&version=2}
 {} 0 6
4767121 [qtp559670971-21] ERROR org.apache.solr.core.SolrCore  [   test] – 
org.apache.solr.common.SolrException: ERROR: [doc=/tmp/RUNNING.txt] Error 
adding field 'stream_size'='null' msg=For input string: "null"

  was:
Using the solrj client to upload the file for indexing causing an SolrException 
error in solrj uploading to solr server. 

I am using the following code

ContentStreamUpdateRequest req = new 
ContentStreamUpdateRequest("/update/extract");
ContentStreamBase.FileStream fs = new FileStream(new File(filename));
req.setWaitSearcher(false);
req.setMethod(METHOD.POST );
req.addContentStream(fs);
req.setParam("literal.id", filename);
req.setParam("resource.name", filename);
NamedList<Object> result = this.mHttpSolrClient.request(req);

However, I am always getting an right after the request, which says

4767120 [qtp559670971-21] INFO  
org.apache.solr.update.processor.LogUpdateProcessor  [   test] – [test] 
webapp=/solr path=/update/extract 
params={waitSearcher=false&resource.name=/tmp/RUNNING.txt&literal.id=/tmp/RUNNING.txt&wt=javabin&version=2}
 {} 0 6
4767121 [qtp559670971-21] ERROR org.apache.solr.core.SolrCore  [   test] – 
org.apache.solr.common.SolrException: ERROR: [doc=/tmp/RUNNING.txt] Error 
adding field 'stream_size'='null' msg=For input string: "null"

                 Flags: Important
    Remaining Estimate: 168h
     Original Estimate: 168h

> Error adding field 'stream_size'='null' msg=For input string: "null" using 
> ContentStreamUpdateRequest
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-7498
>                 URL: https://issues.apache.org/jira/browse/SOLR-7498
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: 5.1
>         Environment: Windows, Linux, Oracle Java SDK8
>            Reporter: Swoorup Joshi
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Using the solrj client to upload the file for indexing causing an 
> SolrException error in solrj uploading to solr server. This only occurs when 
> using the solrj client. 
> Using the solr's own post tool it just works fine as the stream_size is set 
> to a numeric value
> I am using the following code
> ContentStreamUpdateRequest req = new 
> ContentStreamUpdateRequest("/update/extract");
> ContentStreamBase.FileStream fs = new FileStream(new File(filename));
> req.setWaitSearcher(false);
> req.setMethod(METHOD.POST );
> req.addContentStream(fs);
> req.setParam("literal.id", filename);
> req.setParam("resource.name", filename);
> NamedList<Object> result = this.mHttpSolrClient.request(req);
> In Solr server, I receive the following message:
> 4767120 [qtp559670971-21] INFO  
> org.apache.solr.update.processor.LogUpdateProcessor  [   test] – [test] 
> webapp=/solr path=/update/extract 
> params={waitSearcher=false&resource.name=/tmp/RUNNING.txt&literal.id=/tmp/RUNNING.txt&wt=javabin&version=2}
>  {} 0 6
> 4767121 [qtp559670971-21] ERROR org.apache.solr.core.SolrCore  [   test] – 
> org.apache.solr.common.SolrException: ERROR: [doc=/tmp/RUNNING.txt] Error 
> adding field 'stream_size'='null' msg=For input string: "null"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to