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.

-- 

Matt Johnston
http://www.lattaoutdoors.com
http://www.gearapalooza.com


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to