Error posting document

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error posting document

Kerry Wilson-3
I am getting the following error when trying to post any document.

org.xmlpull.v1.XmlPullParserException: only whitespace content allowed
before start tag and not = (position: START_DOCUMENT seen =... @1:1)
    at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
    at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
    at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
    at org.xmlpull.mxp1.MXParser.nextTag(MXParser.java:1078)
    at org.apache.solr.core.SolrCore.update(SolrCore.java:642)
    at
org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:52)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Unknown Source)

Has anyone experienced this?

--
Kerry Wilson
Lead Developer
Williams Web
[hidden email] | 423.485.4747

Reply | Threaded
Open this post in threaded view
|

Re: Error posting document

Yonik Seeley
On 6/20/06, Kerry Wilson <[hidden email]> wrote:
> I am getting the following error when trying to post any document.

Hi Kerry, could you provide an example document that show this?

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: Error posting document

Kerry Wilson-3
It is happening on all documents but just for fun here is one I have used:

<html>
  <head>
    <title>Post to SOLR</title>
  </head>
  <body>
    <form action="http://localhost:8080/solr/update" method="POST">
      <input type="file" name="">
      <input type="submit"/>
    </form>
  </body>
</html>

It happens to be the form I am submitting it from, here is the output:

<result status="1">org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not = (position: START_DOCUMENT seen =... @1:1)
        at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
        at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
        at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
        at org.xmlpull.mxp1.MXParser.nextTag(MXParser.java:1078)
        at org.apache.solr.core.SolrCore.update(SolrCore.java:642)
        at org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:52)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)
</result>


Yonik Seeley wrote:
> On 6/20/06, Kerry Wilson <[hidden email]> wrote:
>> I am getting the following error when trying to post any document.
>
> Hi Kerry, could you provide an example document that show this?
>
> -Yonik
>


--
Kerry Wilson
Lead Developer
Williams Web
[hidden email] | 423.485.4747

Reply | Threaded
Open this post in threaded view
|

Re: Error posting document

Yonik Seeley
Yeah, Solr currently only accepts an HTTP-POST with an XML document as
the post body.  That's not what you will get with a browser-based form
data / file post.

-Yonik

On 6/20/06, Kerry Wilson <[hidden email]> wrote:

> It is happening on all documents but just for fun here is one I have used:
>
> <html>
>   <head>
>     <title>Post to SOLR</title>
>   </head>
>   <body>
>     <form action="http://localhost:8080/solr/update" method="POST">
>       <input type="file" name="">
>       <input type="submit"/>
>     </form>
>   </body>
> </html>
>
> It happens to be the form I am submitting it from, here is the output:
>
> <result status="1">org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not = (position: START_DOCUMENT seen =... @1:1)
>         at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
>         at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
>         at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
>         at org.xmlpull.mxp1.MXParser.nextTag(MXParser.java:1078)
>         at org.apache.solr.core.SolrCore.update(SolrCore.java:642)
>         at org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:52)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
>         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>         at java.lang.Thread.run(Unknown Source)
> </result>
>
>
> Yonik Seeley wrote:
> > On 6/20/06, Kerry Wilson <[hidden email]> wrote:
> >> I am getting the following error when trying to post any document.
> >
> > Hi Kerry, could you provide an example document that show this?
> >
> > -Yonik
Reply | Threaded
Open this post in threaded view
|

Re: Error posting document

Chris Hostetter-3

: Yeah, Solr currently only accepts an HTTP-POST with an XML document as
: the post body.  That's not what you will get with a browser-based form
: data / file post.

Also, if i'm reading this comment correctly...

: > It happens to be the form I am submitting it from, here is the output:

...then the document you are trying to submit to Solr *is* the same HTML
form you listed.  Solr XML Documents have a specific format with
information about what the field/values are that you want Solr to index --
it doesn't parse raw text or HTML documents, This Wiki has more
information on the specifics...

        http://wiki.apache.org/solr/UpdateXmlMessages

...as well as links to several examplesdocs...

https://svn.apache.org/repos/asf/incubator/solr/trunk/example/exampledocs/


-Hoss