You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David (JIRA)" <ji...@apache.org> on 2014/02/01 00:40:09 UTC

[jira] [Commented] (SOLR-4021) JavaBinCodec has poor default behavior for unrecognized classes of objects

    [ https://issues.apache.org/jira/browse/SOLR-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13888314#comment-13888314 ] 

David commented on SOLR-4021:
-----------------------------

I am getting reyplay_err I/O exceptions using Solr 4.5.1

{code}
org.apache.solr.common.SolrException: ERROR: [doc=96in turlington natural cove basebruce!2190668] Error adding field 'weight'='java.math.BigDecimal:5.00' msg=For input string: "java.math.BigDecimal:5.00"
	at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:167)
	at org.apache.solr.update.AddUpdateCommand.getLuceneDocument(AddUpdateCommand.java:77)
	at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:215)
	at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:69)
	at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)
	at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:556)
	at org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:692)
	at org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:435)
	at org.apache.solr.update.UpdateLog$LogReplayer.doReplay(UpdateLog.java:1313)
	at org.apache.solr.update.UpdateLog$LogReplayer.run(UpdateLog.java:1202)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NumberFormatException: For input string: "java.math.BigDecimal:5.00"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1241)
	at java.lang.Float.parseFloat(Float.java:452)
	at org.apache.solr.schema.TrieField.createField(TrieField.java:598)
	at org.apache.solr.schema.TrieField.createFields(TrieField.java:655)
	at org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:47)
	at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:118)
	... 18 more
{code}

> JavaBinCodec has poor default behavior for unrecognized classes of objects
> --------------------------------------------------------------------------
>
>                 Key: SOLR-4021
>                 URL: https://issues.apache.org/jira/browse/SOLR-4021
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 4.0
>            Reporter: Hoss Man
>
> It seems that JavaBinCodec has inconsistent serialize/deserialize behavior when dealing with objects of classes that it doesn't recognized.  In particular, unrecnognized objects seem to be serialized with the full classname prepented to the "toString()" value, and then that resulting concatentated string is left as is during deserialization.
> as a concrete example: serializing & deserializing a BigDecimal value results in a final value like "java.math.BigDecimal:1848.66" even though for most users the simple toString() value would have worked as intended.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org