Solr
  1. Solr
  2. SOLR-2402

Add more debug info for DocumentBuilder errors

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      When digging though logs, it is hard to figure out what went wrong with errors like:

      2011-03-04 11:43:52,773 INFO org.apache.solr.update.processor.UpdateRequestProcessor - {} 0 0
      2011-03-04 11:43:52,773 ERROR org.apache.solr.core.SolrCore - java.lang.NumberFormatException: multiple points
      	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1084)
      	at java.lang.Float.parseFloat(Float.java:422)
      	at org.apache.solr.schema.TrieField.createField(TrieField.java:512)
      	at org.apache.solr.schema.SchemaField.createField(SchemaField.java:94)
      	at org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:204)
      	at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:277)
      	at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60)
      	at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:94)
      	at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:53)
      

      would be nice to know the field name/value and ideally the ID value also.

        Activity

        Ryan McKinley created issue -
        Ryan McKinley made changes -
        Field Original Value New Value
        Attachment SOLR-2402-doc-builder-error-messages.patch [ 12472859 ]
        Hide
        Ryan McKinley added a comment - - edited

        This now gives an error like:

        
        org.apache.solr.common.SolrException: ERROR: [doc=123] Error adding field 'weight'='not a number'
        	at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:325)
        	at org.apache.solr.update.DocumentBuilderTest.testExceptions(DocumentBuilderTest.java:90)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	........
        Caused by: java.lang.NumberFormatException: For input string: "not a number"
        	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
        	at java.lang.Float.parseFloat(Float.java:422)
        	at org.apache.solr.schema.TrieField.createField(TrieField.java:508)
        	at org.apache.solr.schema.SchemaField.createField(SchemaField.java:97)
        	at org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:204)
        	at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:282)
        	... 29 more
        
        Show
        Ryan McKinley added a comment - - edited This now gives an error like: org.apache.solr.common.SolrException: ERROR: [doc=123] Error adding field 'weight'='not a number' at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:325) at org.apache.solr.update.DocumentBuilderTest.testExceptions(DocumentBuilderTest.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ........ Caused by: java.lang.NumberFormatException: For input string: "not a number" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224) at java.lang. Float .parseFloat( Float .java:422) at org.apache.solr.schema.TrieField.createField(TrieField.java:508) at org.apache.solr.schema.SchemaField.createField(SchemaField.java:97) at org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:204) at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:282) ... 29 more
        Hide
        Ryan McKinley added a comment -

        added to /trunk in 1078928

        could be merged with 3.x, but lets wait 'till after the pending release

        Show
        Ryan McKinley added a comment - added to /trunk in 1078928 could be merged with 3.x, but lets wait 'till after the pending release
        Ryan McKinley made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.0 [ 12314992 ]
        Resolution Fixed [ 1 ]
        Hide
        Hoss Man added a comment -

        merged back to 3x...

        Committed revision 1202510

        (It's smoked on trunk for a while, and it's very useful – discovered it wasn't on 3x while working on SOLR-2813)

        Show
        Hoss Man added a comment - merged back to 3x... Committed revision 1202510 (It's smoked on trunk for a while, and it's very useful – discovered it wasn't on 3x while working on SOLR-2813 )
        Hoss Man made changes -
        Fix Version/s 3.5 [ 12317876 ]
        Hide
        Uwe Schindler added a comment -

        Bulk close after 3.5 is released

        Show
        Uwe Schindler added a comment - Bulk close after 3.5 is released
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Ryan McKinley
            Reporter:
            Ryan McKinley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development