Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002584 [Resin] minor always 04-09-08 09:13 06-09-08 09:32
Reporter ferg View Status public  
Assigned To ferg
Priority high Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.2.0 Product Version 3.1.6
  Product Build
Summary 0002584: hessian Lucene serialization
Description (rep by Matt Johnson)

I am trying to use a Lucene index and place my documents to be indexed
into a JMS queue. The Lucene Document class is documented as being
serializable.

When my queue listener tries to work on the submitted lucene Document
object, I get an error:

could not index doc: ObjectMessageImpl[ID:DOmYA38A3joAEZMMeI8wAK]
com.caucho.jms.JMSExceptionWrapper:
org.apache.lucene.document.Document.fields:
'org.apache.lucene.document.Field' could not be instantiated
    at com.caucho.jms.JMSExceptionWrapper.create(JMSExceptionWrapper.java:76)
    at
com.caucho.jms.message.ObjectMessageImpl.getObject(ObjectMessageImpl.java:120)
    at
latta.ejb3.indexer.ProductIndexQueue.onMessage(ProductIndexQueue.java:34)
    at
_ejb.ProductIndexQueue.ProductIndexQueue__EJB.onMessage(ProductIndexQueue__EJB.java:75)
    at
com.caucho.jms.connection.MessageConsumerImpl.handleMessage(MessageConsumerImpl.java:326)
    at com.caucho.jms.connection.JmsSession.run(JmsSession.java:1072)
    at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:721)
    at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:643)
    at java.lang.Thread.run(Thread.java:619)
Caused by: com.caucho.hessian.io.HessianFieldException:
org.apache.lucene.document.Document.fields:
'org.apache.lucene.document.Field' could not be instantiated
    at
com.caucho.hessian.io.JavaDeserializer.logDeserializeError(JavaDeserializer.java:590)
    at
com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(JavaDeserializer.java:391)
    at
com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:233)
    at
com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:157)
    at
com.caucho.hessian.io.SerializerFactory.readObject(SerializerFactory.java:376)
    at
com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2051)
    at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1977)
    at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1969)
    at
com.caucho.jms.message.ObjectMessageImpl.getObject(ObjectMessageImpl.java:114)
    ... 7 more
Caused by: com.caucho.hessian.io.HessianProtocolException:
'org.apache.lucene.document.Field' could not be instantiated
    at
com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:275)
    at
com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:155)
    at
com.caucho.hessian.io.SerializerFactory.readObject(SerializerFactory.java:376)
    at
com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2051)
    at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1977)
    at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1969)
    at
com.caucho.hessian.io.CollectionDeserializer.readList(CollectionDeserializer.java:78)
    at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1700)
    at
com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(JavaDeserializer.java:387)
    ... 14 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at
com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:271)
    ... 22 more
Caused by: java.lang.NullPointerException: name cannot be null
    at org.apache.lucene.document.Field.<init>(Field.java:306)
    at org.apache.lucene.document.Field.<init>(Field.java:290)
    ... 27 more


I've tried this with Lucene 2.2.0 and 2.3.1 and the same error occurs. I
am using the Resin 080331 snapshot. Any pointers or work arounds would
be helpful.

Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003150)
ferg
06-09-08 09:32

hessian/3a49

Added FooSerializerFactory with a Object writeReplace(Foo foo) method which will allow wrapper classes for legacy classes like the Lucent Field.
 

- Issue History
Date Modified Username Field Change
04-09-08 09:13 ferg New Issue
06-09-08 09:32 ferg Note Added: 0003150
06-09-08 09:32 ferg Assigned To  => ferg
06-09-08 09:32 ferg Status new => closed
06-09-08 09:32 ferg Resolution open => fixed
06-09-08 09:32 ferg Fixed in Version  => 3.2.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker