OK. So, I just freshly formated my dev box. Reinstalled Ubuntu 6.06 LTS
(amd64), Java 6 (64bit), Tomcat 6.0.16 (with URIEncoding="UTF-8"), and
installed solr-1.2.0. 

I'm still getting the same weird errors, but they have changed a little bit.
Below are the errors that are return as I hit refresh. It appears that the
error message is slightly differnet every refresh, "...start tag and not
XXX"... xxx changes between letters numbers and other random characters.
Also attached is the document I'm posting. I've posted this doc both from
coldfusion and curl (both are not multi-threaded). It will occasionally post
WITHOUT error. Although it's still random. What I've concluded is, this only
happens with a large post, if your only posting a few feilds it returns
succesful.

Let me know if I can provide any other details and I'll be happy. Thanks
Yonik!

Dan

POSTING:
<?xml version="1.0" encoding="UTF-8"?>
        <add overwriteCommitted="true" overwritePending="true">
                <doc boost="1.0">
                        <field name="id">k-12182kohler</field>
                        <field name="productID">K-12182 </field>
                        <field name="manufacturer">kohler</field>
                        <field name="productTitle">Single Hole Single Handle 
Lavatory Faucet From
The Fairfax Collection.</field>
                        <field name="theme"/>
                        <field name="series">fairfax</field>
                        <field name="onSale">false</field>
                        <field name="isNew">false</field>
                        <field name="isTopSeller">true</field>
                        <field name="hasDigiCast">false</field>
                        <field name="hasDigiVista">true</field>
                        <field name="popularity">8102</field>
                        <field name="description">&lt;UL&gt;&lt;B&gt;Fairfax® 
single-control
lavatory faucet with lever handle&lt;/B&gt; &lt;BR&gt;The Fairfax faucet
collection blends classic style with ease of operation. The graceful curves
of this single-control faucet create a timeless appeal appropriate for any
installation, from powder room to master bath. KOHLER washerless ceramic
disc valves exceed industry longevity standards two times, so you can enjoy
years of reliable performance. A high-temperature limit stop helps to
prevent scalding. &lt;LI&gt;Premium material construction for durability and
reliability &lt;LI&gt;KOHLER finishes resist corrosion and tarnishing,
exceeding industry durability standards over two times &lt;LI&gt;Flexible
stainless steel supplies simplify installation &lt;LI&gt;Completes Fairfax
design solution with Kohler accessories. &lt;LI&gt;Low-flow aerator option
available (please see latest price book)&lt;/LI&gt;&lt;/UL&gt;</field>
                        <field 
name="productAddDate">2007-07-31T00:00:00Z</field>
                        <field name="sku">K-12182 -BV</field>
                        <field name="upc">087206576935</field>
                        <field name="price">197.05</field>
                        <field name="price_pricebook_1_numeric">197.05</field>
                        <field name="price_pricebook_2_numeric">197.05</field>
                        <field name="price_pricebook_3_numeric">75.79</field>
                        <field name="price_pricebook_5_numeric">197.05</field>
                        <field name="price_pricebook_6_numeric">197.05</field>
                        <field name="price_pricebook_7_numeric">197.05</field>
                        <field name="price_pricebook_8_numeric">197.05</field>
                        <field name="price_pricebook_9_numeric">167.49</field>
                        <field name="price_pricebook_10_numeric">272.83</field>
                        <field name="price_pricebook_11_numeric">197.05</field>
                        <field name="price_pricebook_12_numeric">187.2</field>
                        <field name="finish">Brushed Bronze</field>
                        <field name="finish_string">Brushed Bronze</field>
                        <field name="masterFinish">bronze tones</field>
                        <field name="masterFinish_string">Bronze Tones</field>
                        <field name="inStock">true</field>
                        <field name="sku">K-12182-G</field> 
                        <field name="upc">20087206537831</field>
                        <field name="price">134.91</field>
                        <field name="sku">K-12182 -BV</field>
                        <field name="upc">087206576935</field>
                        <field name="price">197.05</field>
                        <field name="price_pricebook_1_numeric">197.05</field>
                        <field name="price_pricebook_2_numeric">197.05</field>
                        <field name="price_pricebook_3_numeric">75.79</field>
                        <field name="price_pricebook_5_numeric">197.05</field>
                        <field name="price_pricebook_6_numeric">197.05</field>
                        <field name="price_pricebook_7_numeric">197.05</field>
                        <field name="price_pricebook_8_numeric">197.05</field>
                        <field name="price_pricebook_9_numeric">167.49</field>
                        <field name="price_pricebook_10_numeric">272.83</field>
                        <field name="price_pricebook_11_numeric">197.05</field>
                        <field name="price_pricebook_12_numeric">187.2</field>
                        <field name="finish">Brushed Bronze</field>
                        <field name="finish_string">Brushed Bronze</field>
                        <field name="masterFinish">bronze tones</field>
                        <field name="masterFinish_string">Bronze Tones</field>
                        <field name="inStock">true</field>
                        <field name="sku">K-12182-G</field> 
                        <field name="upc">20087206537831</field>
                        <field name="price">134.91</field> 
                        <field name="sku">K-12182 -BV</field>
                        <field name="upc">087206576935</field>
                        <field name="price">197.05</field>
                        <field name="price_pricebook_1_numeric">197.05</field>
                        <field name="price_pricebook_2_numeric">197.05</field>
                        <field name="price_pricebook_3_numeric">75.79</field>
                        <field name="price_pricebook_5_numeric">197.05</field>
                        <field name="price_pricebook_6_numeric">197.05</field>
                        <field name="price_pricebook_7_numeric">197.05</field>
                        <field name="price_pricebook_8_numeric">197.05</field>
                        <field name="price_pricebook_9_numeric">167.49</field>
                        <field name="price_pricebook_10_numeric">272.83</field>
                        <field name="price_pricebook_11_numeric">197.05</field>
                        <field name="price_pricebook_12_numeric">187.2</field>
                        <field name="finish">Brushed Bronze</field>
                        <field name="finish_string">Brushed Bronze</field>
                        <field name="masterFinish">bronze tones</field>
                        <field name="masterFinish_string">Bronze Tones</field>
                        <field name="inStock">true</field>
                        <field name="sku">K-12182-G</field> 
                        <field name="upc">20087206537831</field>
                        <field name="price">134.91</field>
                        <field name="sku">K-12182 -BV</field>
                        <field name="upc">087206576935</field>
                        <field name="price">197.05</field>
                        <field name="price_pricebook_1_numeric">197.05</field>
                        <field name="price_pricebook_2_numeric">197.05</field>
                        <field name="price_pricebook_3_numeric">75.79</field>
                        <field name="price_pricebook_5_numeric">197.05</field>
                        <field name="price_pricebook_6_numeric">197.05</field>
                        <field name="price_pricebook_7_numeric">197.05</field>
                        <field name="price_pricebook_8_numeric">197.05</field>
                        <field name="price_pricebook_9_numeric">167.49</field>
                        <field name="price_pricebook_10_numeric">272.83</field>
                        <field name="price_pricebook_11_numeric">197.05</field>
                        <field name="price_pricebook_12_numeric">187.2</field>
                        <field name="finish">Brushed Bronze</field>
                        <field name="finish_string">Brushed Bronze</field>
                        <field name="masterFinish">bronze tones</field>
                        <field name="masterFinish_string">Bronze Tones</field>
                        <field name="inStock">true</field>
                        <field name="sku">K-12182-G</field> 
                        <field name="upc">20087206537831</field>
                        <field name="price">134.91</field> 
                        <field name="sku">K-12182 -BV</field>
                        <field name="upc">087206576935</field>
                        <field name="price">197.05</field>
                        <field name="price_pricebook_1_numeric">197.05</field>
                        <field name="price_pricebook_2_numeric">197.05</field>
                        <field name="price_pricebook_3_numeric">75.79</field>
                        <field name="price_pricebook_5_numeric">197.05</field>
                        <field name="price_pricebook_6_numeric">197.05</field>
                        <field name="price_pricebook_7_numeric">197.05</field>
                        <field name="price_pricebook_8_numeric">197.05</field>
                        <field name="price_pricebook_9_numeric">167.49</field>
                        <field name="price_pricebook_10_numeric">272.83</field>
                        <field name="price_pricebook_11_numeric">197.05</field>
                        <field name="price_pricebook_12_numeric">187.2</field>
                        <field name="finish">Brushed Bronze</field>
                        <field name="finish_string">Brushed Bronze</field>
                        <field name="masterFinish">bronze tones</field>
                        <field name="masterFinish_string">Bronze Tones</field>
                        <field name="inStock">true</field>
                        <field name="sku">K-12182-G</field> 
                        <field name="upc">20087206537831</field>
                        <field name="price">134.91</field> 
                        <field name="sku">K-12182 -BV</field>
                        <field name="upc">087206576935</field>
                        <field name="price">197.05</field>
                        <field name="price_pricebook_1_numeric">197.05</field>
                        <field name="price_pricebook_2_numeric">197.05</field>
                        <field name="price_pricebook_3_numeric">75.79</field>
                        <field name="price_pricebook_5_numeric">197.05</field>
                        <field name="price_pricebook_6_numeric">197.05</field>
                        <field name="price_pricebook_7_numeric">197.05</field>
                        <field name="price_pricebook_8_numeric">197.05</field>
                        <field name="price_pricebook_9_numeric">167.49</field>
                        <field name="price_pricebook_10_numeric">272.83</field>
                        <field name="price_pricebook_11_numeric">197.05</field>
                        <field name="price_pricebook_12_numeric">187.2</field>
                        <field name="finish">Brushed Bronze</field>
                        <field name="finish_string">Brushed Bronze</field>
                        <field name="masterFinish">bronze tones</field>
                        <field name="masterFinish_string">Bronze Tones</field>
                        <field name="inStock">true</field>
                        <field name="sku">K-12182-G</field> 
                        <field name="upc">20087206537831</field>
                        <field name="price">134.91</field>                      
                                                                                
                
                </doc>
        </add>

<result status="1">org.xmlpull.v1.XmlPullParserException: only whitespace
content allowed before start tag and not i (position: START_DOCUMENT seen
i... @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.handler.XmlUpdateRequestHandler.update(XmlUpdateRequestHandler.java:111)
at
org.apache.solr.handler.XmlUpdateRequestHandler.doLegacyUpdate(XmlUpdateRequestHandler.java:355)
at
org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:185)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619) </result> 


Yonik Seeley wrote:
> 
> On Thu, Apr 17, 2008 at 8:12 PM, Brian Johnson <[EMAIL PROTECTED]>
> wrote:
>> The XML parser is probably not threadsafe but is being reused
>> concurrently by multiple post threads resulting in these exceptions.
> 
> Hmmm, yes, the factory is reused... here's the code we use to try and
> make it thread-safe:
> 
>   @Override
>   public void init(NamedList args)
>   {
>     super.init(args);
> 
>     inputFactory = BaseXMLInputFactory.newInstance();
>     try {
>       // The java 1.6 bundled stax parser (sjsxp) does not currently
> have a thread-safe
>       // XMLInputFactory, as that implementation tries to cache and reuse
> the
>       // XMLStreamReader.  Setting the parser-specific
> "reuse-instance" property to false
>       // prevents this.
>       // All other known open-source stax parsers (and the bea ref impl)
>       // have thread-safe factories.
>       inputFactory.setProperty("reuse-instance", Boolean.FALSE);
>     }
>     catch( IllegalArgumentException ex ) {
>       // Other implementations will likely throw this exception since
> "reuse-instance"
>       // isimplementation specific.
>       log.fine( "Unable to set the 'reuse-instance' property for the
> input factory: "+inputFactory );
>     }
>   }
> 
> 
> Dan: are you sending updates with multiple threads?  If so, can you
> just try a single one at a time?
> 
> -Yonik
> 
> 
> 
>> The observed 'randomness' of the errors would be due to the unpredictable
>> nature of the race condition between threads. The reason you don't see
>> this with smaller documents would be that the likelihood of contention on
>> small documents is reduced because the race is eliminated. This would
>> also be generally independent of JVM, OS, memory allocation, etc as it
>> seems to be.
>>
>>  I would look into how these classes/methods are dealing with the parser
>> factory. (keeping a static copy maybe?)
>>
>>
>> 
>> org.apache.solr.handler.XmlUpdateRequestHandler.processUpdate(XmlUpdateRequestHandler.java:148)
>>
>> org.apache.solr.handler.XmlUpdateRequestHandler.doLegacyUpdate(XmlUpdateRequestHandler.java:386)
>>
>> org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:65)
>>
>>  This seems to me to be the most likely culprit given what I've seen so
>> far on this thread. I hope it helps.
>>
>>  -- Brian
>>
>>
>>
>>  ----- Original Message ----
>>  From: Yonik Seeley <[EMAIL PROTECTED]>
>>  To: solr-user@lucene.apache.org
>>  Sent: Thursday, April 17, 2008 3:28:08 PM
>>  Subject: Re: ODD Solr Error on Update POST - XMLStreamException:
>> ParseError
>>
>>  On Thu, Apr 17, 2008 at 5:41 PM, realw5 <[EMAIL PROTECTED]>
>> wrote:
>>  >  Ok, so I tried tomcat 5.5, still not go. It might be helpful to note,
>> that
>>  >  when I decrease the size of the post (take fields out) I can get it
>> to post
>>  >  without error. It seems like it's barfing on a certain file size
>> (buffer
>>  >  issue maybe??). I'm running 32-bit Ubuntu on our production system
>> and have
>>  >  never seen these errors. Is it possible libc has a bug only in 64-bit
>>  >  Ubuntu?
>>  >
>>  >  Lastly, I can try another OS...do you have any recommendations for a
>> good
>>  >  64-bit linux flavor?
>>
>>  Whatever you are comfortable with... if you don't already have
>>  something lying around, perhaps the latest ubuntu beta (8.04)
>>
>>  Also double-check that you are sending exactly what you think you are.
>>  If you haven't already, capture the XML you are sending to a file,
>>  then use curl (the same version on the same box) to send the file to
>>  both the server that works and the one that doesn't.
>>
>>  -Yonik
>>
>>
>>
>>
> 
> 
http://www.nabble.com/file/p16758975/test_post.xml test_post.xml 
-- 
View this message in context: 
http://www.nabble.com/ODD-Solr-Error-on-Update-POST---XMLStreamException%3A-ParseError-tp16751961p16758975.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to