Jorn, this is an interesting bug. Current UIMA AS service code serializes
the Exception object and the client side deserializes it. The activemq
client fails in the way you describe if a class in the serialized object is
not available.
Seems like UIMA AS bug to me. UIMA AS service side should serialize the
Exception to a String and send it in a reply back to the client instead
serializing the Exception object. The client should not have any
dependencies on user code. Please create a JIRA for this.
Thanks for reporting this bug!
Jerry C
On Thu, Dec 8, 2011 at 8:22 AM, Jörn Kottmann <kottmann@gmail.com> wrote:
> Hi all,
>
> I have a pretty generic UIMA AS client I reuse for various
> analysis pipelines. The client gets its input from an ActiveMQ
> queue and then sends it on to my UIMA AS services via the
> UIMA AS Client API.
>
> The loop which is sending requests to the UIMA AS service
> is using the sendCAS method.
>
> Once in a while something goes wrong in one of the AEs process
> methods and it throws an exception.
>
> For example our Solrcas AE from the addons package might catch an
> exception and then re-throws it like this:
> throw new AnalysisEngineProcessException**(e);
>
> e is in this case some kind of exception which was thrown by the Solr
> client
> API.
>
> On my UIMA AS client I now get an exception like this:
> Dec 8, 2011 1:55:55 PM org.apache.uima.adapter.jms.**client.**
> BaseUIMAAsynchronousEngineComm**on_impl$2 onMessage
> WARNING: javax.jms.JMSException: Failed to build body from content.
> Serializable class not available to broker. Reason: java.lang.**ClassNotFoundException:
> org.apache.solr.comm
> on.SolrException
> at org.apache.activemq.util.**JMSExceptionSupport.create(**
> JMSExceptionSupport.java:35)
> at org.apache.activemq.command.**ActiveMQObjectMessage.**getObject(
> **ActiveMQObjectMessage.java:**186)
> at org.apache.uima.adapter.jms.**client.**
> BaseUIMAAsynchronousEngineComm**on_impl.**retrieveExceptionFromMessage(**
> BaseUIMAAsynchronousEngineComm**on_impl.java:1075)
> at org.apache.uima.adapter.jms.**client.**
> BaseUIMAAsynchronousEngineComm**on_impl.handleException(**
> BaseUIMAAsynchronousEngineComm**on_impl.java:1397)
> at org.apache.uima.adapter.jms.**client.**
> BaseUIMAAsynchronousEngineComm**on_impl.handleProcessReply(**
> BaseUIMAAsynchronousEngineComm**on_impl.java:1176)
> at org.apache.uima.adapter.jms.**client.**
> BaseUIMAAsynchronousEngineComm**on_impl$2.run(**
> BaseUIMAAsynchronousEngineComm**on_impl.java:1714)
> at java.util.concurrent.**ThreadPoolExecutor$Worker.**
> runTask(ThreadPoolExecutor.**java:886)
> at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
> ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.**java:662)
> Caused by: java.lang.**ClassNotFoundException: org.apache.solr.common.**
> SolrException
> at java.net.URLClassLoader$1.run(**URLClassLoader.java:202)
> at java.security.**AccessController.doPrivileged(**Native Method)
> at java.net.URLClassLoader.**findClass(URLClassLoader.java:**190)
> at java.lang.ClassLoader.**loadClass(ClassLoader.java:**306)
>
>
> Is there a way to improve this? Or do I always need to deploy all jars my
> UIMA AS service depends on
> to my client as well?
>
> Thanks,
> Jörn
>
>
|