[hibernate-issues] [Hibernate-JIRA] Resolved: (HSEARCH-681) NotSerializableException when NumericField gets serialized in JMSBackendQueueProcessor

Hardy Ferentschik (JIRA) noreply at atlassian.com
Thu Aug 11 09:26:02 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hardy Ferentschik resolved HSEARCH-681.
---------------------------------------

    Resolution: Fixed

> NotSerializableException when NumericField gets serialized in JMSBackendQueueProcessor
> --------------------------------------------------------------------------------------
>
>                 Key: HSEARCH-681
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-681
>             Project: Hibernate Search
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 3.3.0.Final
>         Environment: Master-Slave-Architecture
>            Reporter: Katrin E.
>             Fix For: 4.0.0.Alpha1
>
>
> We have a master-slave-architecture which delegates an index update to the master. We have NumericFields in the index to perform NumericRangeQueries. When the slave tries to inform the master via JMSBackendQueueProcessor the object including a NumericField gets serialized. A NotSerializableException occurs on a NumericTokenStream. The NumericField extends AbstractField, which implements Serializable, but it cannot be serialized because it stores the precisionStep in the underlying NumericTokenStream, which is not serializable.
> This might be a lucene issue, but Hibernate Search gets affected for NumericRangeQueries. There is an issue on the lucene jira as well but isn't resolved yet:
> https://issues.apache.org/jira/browse/LUCENE-2707
> Here is a code snippet to test the serialization of a NumericField:
> NumericField number = new NumericField("number", 4);
> number.setFloatValue(42f);
> try {
>     FileOutputStream fout = new FileOutputStream("number.txt");
>     ObjectOutputStream oos = new ObjectOutputStream(fout);
>     oos.writeObject(number);
>     oos.close();
> } catch (IOException e) {
>     // TODO Auto-generated catch block
>     e.printStackTrace();
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list