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 Gérard Dupont <ge...@gmail.com> on 2009/07/20 17:58:18 UTC

SolrJ embedded server : error while adding document

Hi SolR guys,

I'm starting to play with SolR after few years with classic Lucene. I'm
trying to index a single document using the embedded server, but I got a
strange error which looks like XML parsing problem (see trace hereafter). To
add details, this is a simple Junit which create single document then pass
it to the server in a Arraylist<SolrInputDocument>. The document only have 2
fields id and text as it is described in the configuration.

ul 20, 2009 5:50:50 PM org.apache.solr.common.SolrException log
SEVERE: 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)
    at
org.weblab_project.services.solr.SolrComponent.flushIndexBuffer(SolrComponent.java:132)
    at
org.weblab_project.services.solr.SolrComponentTest.testAddOneDocument(SolrComponentTest.java:66)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Jul 20, 2009 5:50:50 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=null path=/update params={} status=500 QTime=6
Cannot flush the index buffer : Server error while adding documents

-- 
Gérard Dupont
Information Processing Control and Cognition (IPCC) - EADS DS
http://weblab-project.org

Document & Learning team - LITIS Laboratory

Re: SolrJ embedded server : error while adding document

Posted by Gérard Dupont <ge...@gmail.com>.
On Mon, Jul 20, 2009 at 18:35, Ryan McKinley <ry...@gmail.com> wrote:

> you send a bunch of requests with add( doc/collection ) and they are not
> visible until you send commit()


That's what I meant thanks.

-- 
Gérard Dupont
Information Processing Control and Cognition (IPCC) - EADS DS
http://weblab-project.org

Document & Learning team - LITIS Laboratory

Re: SolrJ embedded server : error while adding document

Posted by Ryan McKinley <ry...@gmail.com>.
not sure what you mean...  yes, i guess...

you send a bunch of requests with add( doc/collection ) and they are  
not visible until you send commit()


On Jul 20, 2009, at 9:07 AM, Gérard Dupont wrote:

> my mistake, pb with the buffer I added. But it raises a question :  
> does solr
> (using embedded server) has its own buffer mechanism in indexing or  
> not ? I
> guess not but I might be wrong.
>
> 2009/7/20 Gérard Dupont <ge...@gmail.com>
>
>> Hi SolR guys,
>>
>> I'm starting to play with SolR after few years with classic Lucene.  
>> I'm
>> trying to index a single document using the embedded server, but I  
>> got a
>> strange error which looks like XML parsing problem (see trace  
>> hereafter). To
>> add details, this is a simple Junit which create single document  
>> then pass
>> it to the server in a Arraylist<SolrInputDocument>. The document  
>> only have 2
>> fields id and text as it is described in the configuration.
>>
>> ul 20, 2009 5:50:50 PM org.apache.solr.common.SolrException log
>> SEVERE: 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)
>>    at
>> org 
>> .weblab_project 
>> .services.solr.SolrComponent.flushIndexBuffer(SolrComponent.java:132)
>>    at
>> org 
>> .weblab_project 
>> .services 
>> .solr.SolrComponentTest.testAddOneDocument(SolrComponentTest.java:66)
>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>    at
>> sun 
>> .reflect 
>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>    at
>> sun 
>> .reflect 
>> .DelegatingMethodAccessorImpl 
>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>    at java.lang.reflect.Method.invoke(Method.java:597)
>>    at junit.framework.TestCase.runTest(TestCase.java:154)
>>    at junit.framework.TestCase.runBare(TestCase.java:127)
>>    at junit.framework.TestResult$1.protect(TestResult.java:106)
>>    at junit.framework.TestResult.runProtected(TestResult.java:124)
>>    at junit.framework.TestResult.run(TestResult.java:109)
>>    at junit.framework.TestCase.run(TestCase.java:118)
>>    at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>    at junit.framework.TestSuite.run(TestSuite.java:203)
>>    at
>> org 
>> .eclipse 
>> .jdt 
>> .internal 
>> .junit 
>> .runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>>    at
>> org 
>> .eclipse 
>> .jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>    at
>> org 
>> .eclipse 
>> .jdt 
>> .internal 
>> .junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>>    at
>> org 
>> .eclipse 
>> .jdt 
>> .internal 
>> .junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>>    at
>> org 
>> .eclipse 
>> .jdt 
>> .internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java: 
>> 386)
>>    at
>> org 
>> .eclipse 
>> .jdt 
>> .internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java: 
>> 196)
>>
>> Jul 20, 2009 5:50:50 PM org.apache.solr.core.SolrCore execute
>> INFO: [] webapp=null path=/update params={} status=500 QTime=6
>> Cannot flush the index buffer : Server error while adding documents
>>
>> --
>> Gérard Dupont
>> Information Processing Control and Cognition (IPCC) - EADS DS
>> http://weblab-project.org
>>
>> Document & Learning team - LITIS Laboratory
>>
>>
>
>
> -- 
> Gérard Dupont
> Information Processing Control and Cognition (IPCC) - EADS DS
> http://weblab-project.org
>
> Document & Learning team - LITIS Laboratory


Re: SolrJ embedded server : error while adding document

Posted by Gérard Dupont <ge...@gmail.com>.
my mistake, pb with the buffer I added. But it raises a question : does solr
(using embedded server) has its own buffer mechanism in indexing or not ? I
guess not but I might be wrong.

2009/7/20 Gérard Dupont <ge...@gmail.com>

> Hi SolR guys,
>
> I'm starting to play with SolR after few years with classic Lucene. I'm
> trying to index a single document using the embedded server, but I got a
> strange error which looks like XML parsing problem (see trace hereafter). To
> add details, this is a simple Junit which create single document then pass
> it to the server in a Arraylist<SolrInputDocument>. The document only have 2
> fields id and text as it is described in the configuration.
>
> ul 20, 2009 5:50:50 PM org.apache.solr.common.SolrException log
> SEVERE: 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)
>     at
> org.weblab_project.services.solr.SolrComponent.flushIndexBuffer(SolrComponent.java:132)
>     at
> org.weblab_project.services.solr.SolrComponentTest.testAddOneDocument(SolrComponentTest.java:66)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at junit.framework.TestCase.runTest(TestCase.java:154)
>     at junit.framework.TestCase.runBare(TestCase.java:127)
>     at junit.framework.TestResult$1.protect(TestResult.java:106)
>     at junit.framework.TestResult.runProtected(TestResult.java:124)
>     at junit.framework.TestResult.run(TestResult.java:109)
>     at junit.framework.TestCase.run(TestCase.java:118)
>     at junit.framework.TestSuite.runTest(TestSuite.java:208)
>     at junit.framework.TestSuite.run(TestSuite.java:203)
>     at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>     at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>
> Jul 20, 2009 5:50:50 PM org.apache.solr.core.SolrCore execute
> INFO: [] webapp=null path=/update params={} status=500 QTime=6
> Cannot flush the index buffer : Server error while adding documents
>
> --
> Gérard Dupont
> Information Processing Control and Cognition (IPCC) - EADS DS
> http://weblab-project.org
>
> Document & Learning team - LITIS Laboratory
>
>


-- 
Gérard Dupont
Information Processing Control and Cognition (IPCC) - EADS DS
http://weblab-project.org

Document & Learning team - LITIS Laboratory