You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Gunnar Wagenknecht <gu...@wagenknecht.org> on 2008/12/18 12:42:22 UTC

[SolrJ] SolrException: missing content stream

Hi,

I'm using SolrJ to index a couple of documents. I do this in batches of
50 docs to safe some machine memory. I call SolrServer#add(Collection)
for each batch.

For some reason, I get the following exception:
org.apache.solr.common.SolrException: missing content stream
	at
org.apache.solr.handler.XmlUpdateRequestHandler.handleRequestBody(XmlUpdateRequestHandler.java:114)
	at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1204)
	at
org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:147)
	at
org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:217)
	at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)

Any ideas what could be the issue? It actually worked fine when I added
only one doc at a time.

-Gunnar

-- 
Gunnar Wagenknecht
gunnar@wagenknecht.org
http://wagenknecht.org/


Re: [SolrJ] SolrException: missing content stream

Posted by Ryan McKinley <ry...@gmail.com>.
i'm not sure what the proper behavior should be...

At the very least it should have an error that says "no documents" --  
alternatively it could just do nothing, but I'm not sure what the  
return value should be in that case.



On Dec 21, 2008, at 11:54 AM, Gunnar Wagenknecht wrote:

> Ryan McKinley schrieb:
>> are you sure the Collection is not empty?
>
> Hehe, I discovered that *after* hitting the send button. I was  
> buffering
> documents in the collection and calling clean after add. ;)
>
> -Gunnar
>
> -- 
> Gunnar Wagenknecht
> gunnar@wagenknecht.org
> http://wagenknecht.org/
>


Re: [SolrJ] SolrException: missing content stream

Posted by Gunnar Wagenknecht <gu...@wagenknecht.org>.
Ryan McKinley schrieb:
> are you sure the Collection is not empty?

Hehe, I discovered that *after* hitting the send button. I was buffering
documents in the collection and calling clean after add. ;)

-Gunnar

-- 
Gunnar Wagenknecht
gunnar@wagenknecht.org
http://wagenknecht.org/


Re: [SolrJ] SolrException: missing content stream

Posted by Ryan McKinley <ry...@gmail.com>.
are you sure the Collection is not empty?
what version are you running?
what do the server logs say when you get this error on the client?

On Dec 18, 2008, at 6:42 AM, Gunnar Wagenknecht wrote:

> Hi,
>
> I'm using SolrJ to index a couple of documents. I do this in batches  
> of
> 50 docs to safe some machine memory. I call SolrServer#add(Collection)
> for each batch.
>
> For some reason, I get the following exception:
> org.apache.solr.common.SolrException: missing content stream
> 	at
> org 
> .apache 
> .solr 
> .handler 
> .XmlUpdateRequestHandler 
> .handleRequestBody(XmlUpdateRequestHandler.java:114)
> 	at
> org 
> .apache 
> .solr 
> .handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
> 	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1204)
> 	at
> org 
> .apache 
> .solr 
> .client 
> .solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java: 
> 147)
> 	at
> org 
> .apache 
> .solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java: 
> 217)
> 	at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
>
> Any ideas what could be the issue? It actually worked fine when I  
> added
> only one doc at a time.
>
> -Gunnar
>
> -- 
> Gunnar Wagenknecht
> gunnar@wagenknecht.org
> http://wagenknecht.org/
>