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 Marcin Pilaczynski <ma...@gmail.com> on 2012/11/01 10:36:44 UTC

Re: SOLR 3.5 sometimes throws java.lang.NumberFormatException: For input string: "java.math.BigDecimal:1848.66"

Thanks for adding this issue to JIRA.

I tried to find the exact problem using debugger step by step
analysis, but do to lack of SOLR internals knowledge and time I didn't
find anything fishy. I only found that when we were feeding SOLR
directly with BigDecimal objects, class JavaBinCodec at line 157 was
reading this strange String "java.math.BigDecimal:1848.66" from some
kind of InputStream. But why this string was in this stream?

2012/10/31 Chris Hostetter <ho...@fucit.org>:
>
> : SOLR relies on JavaBinCodec class which does de/serialization in it's
> : own way - some kind of bug in there?
> :
> : I don't know what is the proper way to handle BigDecimal values in
> : SOLR 3.5 after all?
>
> The safe thing to do is only add "primitive" java objects that Solr
> understands natively - String, Long, Integer, Float, Double, Boolean,
> and Date.  the JavaBinCodec has some logic for trying to deal with other
> types of objects -- but i *thought* it's fall back was to just rely on
> "toString" for any class it doesn't recognize -- so it does seem like
> there is a bug in there somewhere...
>
> https://issues.apache.org/jira/browse/SOLR-4021
>
>
> -Hoss



-- 
Marcin P