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.
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira