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

Katrin E. (JIRA) noreply at atlassian.com
Thu Feb 10 09:13:05 EST 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39909#action_39909 ] 

Katrin E. edited comment on HSEARCH-681 at 2/10/11 8:12 AM:
------------------------------------------------------------

There was an update on the lucene jira issue LUCENE-2707: Won't fix!
Looks like Hibernate must handle the problem.

      was (Author: katinka):
    There was an update on the lucene jira issue LUCENE-2707: Won't fix!
  
> 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
>    Affects Versions: 3.3.0.Final
>         Environment: Master-Slave-Architecture
>            Reporter: Katrin E.
>             Fix For: 3.3.1, 3.4.0
>
>
> 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