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

Sanne Grinovero (JIRA) noreply at atlassian.com
Tue May 17 10:43:25 EDT 2011


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

Sanne Grinovero updated HSEARCH-681:
------------------------------------

    Fix Version/s:     (was: 4.0)
                   4.0.0.Alpha1

> 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.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list