Hi, there were recent changes to the AnalysisEnginePerformanceMetrics class. Specifically a name of one if its internal attributes changed from uniqueName to uimaContextPath. Afterwords, I realized that such change breaks compatibility with older installations and reverted the name back to uniqueName.
Check if you have the same uima-as jars on the client as on the service side. This problem happens if the uimaj-as-core.jar is different. The deserialization of the metrics fails on the client side as it fails to deserialize the class with an unknown attribute uimaContextPath. The latest version of the AnalysisEnginePerformanceMetrics uses the original name for the attribute. JC On Wed, Jun 26, 2013 at 12:25 PM, GATE User <[email protected]> wrote: > I forgot to attach the error message. > > com.thoughtworks.xstream.converters.ConversionException: uimaContextPath : > uimaContextPath : uimaContextPath : uimaContextPath > ---- Debugging information ---- > message : uimaContextPath : uimaContextPath > cause-exception : > com.thoughtworks.xstream.mapper.CannotResolveClassException > cause-message : uimaContextPath : uimaContextPath > class : java.util.ArrayList > required-type : > org.apache.uima.aae.monitor.statistics.AnalysisEnginePerformanceMetrics > path : > /list/org.apache.uima.aae.monitor.statistics.AnalysisEnginePerformanceMetrics/uimaContextPath > ------------------------------- > > > > ----- Forwarded Message ----- > From: GATE User <[email protected]> > To: Uima Users <[email protected]> > Sent: Wednesday, June 26, 2013 12:16 PM > Subject: CannotResolveClassException uimaContextPath > > > > I've set up an AS system and have deployed an analysis engine to it. I've > sent test documents through the queue successfully using > runRemoteAsyncAE.sh script. Afterwards, I made a test program to send CAS > that I auto generate. Watching the queue, it looks like the CAS reaches to > the delegate and gets processed. However, when I use > uimaAsEngine.sendAndReceive(CAS), it seems to just sit there waiting for a > return. If I use uimaASEngine.send(CAS) I get a > CannotResolveClassException regarding uimaContextPath. I can't seem to > find reference to setting a uimaContextPath in the docs or in the example > script. When I stepped through the code execution, I find that that the > exception is thrown at: > > > com.thoughtworks.xtream.converters.reflection.AbstractReflectionConverter > > Class type = implicitCollectionMapping == null > ? determineType(reader, fieldExistsInClass, result, > fieldName, classDefiningField) > : implicitCollectionMapping.getItemType(); > > when the fieldName is "uimaContextPath". It works fine for the first > child where fieldName is "name". > > What does this error mean? > > I am calling the service using the example in the guide: > > Map<String, Object> appContext = new HashMap<String, Object>(); > > appContext.put(UimaAsynchronousEngine.ServerUri, > "tcp://${Broker}:61616"); > appContext.put(UimaAsynchronousEngine.Endpoint, > "StanfordEngineQueue"); > appContext.put(UimaAsynchronousEngine.CasPoolSize, 1); > > uima.addStatusCallbackListener(new CallbackListener()); > uima.initialize(appContext); > > for (int i = 0; i < 1; i++) { > CAS cas = uima.getCAS(); > > cas.setDocumentText("This is just a test, Sam."); > uima.sendCAS(cas); > System.out.println("Sent CAS."); > } > > And the callback listener is pretty much a copy of the callback listener > in the runRemoteAsyncAE.sh. >
