[jira] Created: (SOLR-10) Improved error message in Schema Field

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

[jira] Created: (SOLR-10) Improved error message in Schema Field

JIRA jira@apache.org
Improved error message in Schema Field
--------------------------------------

         Key: SOLR-10
         URL: http://issues.apache.org/jira/browse/SOLR-10
     Project: Solr
        Type: Improvement

  Components: update  
    Reporter: Michael Bryzek
    Priority: Trivial


Provide more detail on number format exception. Facilitates debugging from db environment where default values for numeric fields are stored as null, not numbers. Patch to follow

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-10) Improved error message in Schema Field

JIRA jira@apache.org
     [ http://issues.apache.org/jira/browse/SOLR-10?page=all ]

Michael Bryzek updated SOLR-10:
-------------------------------

    Attachment: SchemaFieldPatch.txt

> Improved error message in Schema Field
> --------------------------------------
>
>          Key: SOLR-10
>          URL: http://issues.apache.org/jira/browse/SOLR-10
>      Project: Solr
>         Type: Improvement

>   Components: update
>     Reporter: Michael Bryzek
>     Priority: Trivial
>  Attachments: SchemaFieldPatch.txt
>
> Provide more detail on number format exception. Facilitates debugging from db environment where default values for numeric fields are stored as null, not numbers. Patch to follow

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-10) Improved error message in Schema Field

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org
    [ http://issues.apache.org/jira/browse/SOLR-10?page=comments#action_12374938 ]

Yonik Seeley commented on SOLR-10:
----------------------------------

The current exception contains the bad text that caused the NumberFormatException... I just tried an example and I see
java.lang.NumberFormatException: For input string: "Hello"

Is the extra debugging information you need the name of the field?

If so, perhaps this try/catch should be moved to FIeldType.createField() since that might be called by some code directly.
The original exception should probably also be chained.


> Improved error message in Schema Field
> --------------------------------------
>
>          Key: SOLR-10
>          URL: http://issues.apache.org/jira/browse/SOLR-10
>      Project: Solr
>         Type: Improvement

>   Components: update
>     Reporter: Michael Bryzek
>     Priority: Trivial
>  Attachments: SchemaFieldPatch.txt
>
> Provide more detail on number format exception. Facilitates debugging from db environment where default values for numeric fields are stored as null, not numbers. Patch to follow

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-10) Improved error message in Schema Field

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org
     [ http://issues.apache.org/jira/browse/SOLR-10?page=all ]

Michael Bryzek updated SOLR-10:
-------------------------------

    Attachment: FieldTypePatch.txt

Providing the field name on error in FieldType sounds like a better solution. The attached patch adds the field name to the stack trace, e.g.:

Error while creating field 'longitude{type=sfloat,properties=stored}' from value ''org.xmlpull.v1.XmlPullParserException: expected START_TAG or END_TAG not END_DOCUMENT (position: END_DOCUMENT seen ...</doc>\n</add>\n\n... @483:1)
        at org.xmlpull.mxp1.MXParser.nextTag(MXParser.java:1083)
        at org.apache.solr.core.SolrCore.update(SolrCore.java:680)
        at org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:51)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
...

> Improved error message in Schema Field
> --------------------------------------
>
>          Key: SOLR-10
>          URL: http://issues.apache.org/jira/browse/SOLR-10
>      Project: Solr
>         Type: Improvement

>   Components: update
>     Reporter: Michael Bryzek
>     Priority: Trivial
>  Attachments: FieldTypePatch.txt, SchemaFieldPatch.txt
>
> Provide more detail on number format exception. Facilitates debugging from db environment where default values for numeric fields are stored as null, not numbers. Patch to follow

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (SOLR-10) Improved error message in Schema Field

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org
     [ http://issues.apache.org/jira/browse/SOLR-10?page=all ]
     
Yonik Seeley closed SOLR-10:
----------------------------

    Resolution: Fixed
     Assign To: Yonik Seeley

I just committed this.  Thanks Michael!

> Improved error message in Schema Field
> --------------------------------------
>
>          Key: SOLR-10
>          URL: http://issues.apache.org/jira/browse/SOLR-10
>      Project: Solr
>         Type: Improvement

>   Components: update
>     Reporter: Michael Bryzek
>     Assignee: Yonik Seeley
>     Priority: Trivial
>  Attachments: FieldTypePatch.txt, SchemaFieldPatch.txt
>
> Provide more detail on number format exception. Facilitates debugging from db environment where default values for numeric fields are stored as null, not numbers. Patch to follow

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira