Hi again, sorry but I still have problems even with the Cas Consumer inside an aggregate Analysis Engine.
The CPE descriptor I've saved with the cpeGui.bat tool is the following. -- cpeDescriptor.xml -- <?xml version="1.0" encoding="UTF-8"?> <cpeDescription xmlns="http://uima.apache.org/resourceSpecifier"> <collectionReader> <collectionIterator> <descriptor> <import location="../../../workspace/imp-helper-uima/src/main/resources/descriptors/collection_reader/TextsListCollectionReader.xml"/> </descriptor> </collectionIterator> </collectionReader> <casProcessors casPoolSize="5" processingUnitThreadCount="1"> <casProcessor deployment="integrated" name=" WordsListAnnotatorSoapService.xml"> <descriptor> <import location="WordsListAnnotatorSoapService.xml"/> </descriptor> <deploymentParameters/> <errorHandling> <errorRateThreshold action="terminate" value="0/1000"/> <maxConsecutiveRestarts action="terminate" value="30"/> <timeout max="100000" default="-1"/> </errorHandling> <checkpoint batch="10000" time="1000ms"/> </casProcessor> <casProcessor deployment="integrated" name="AggregateWordsFilePrinterSoapService"> <descriptor> <import location="AggregateWordsFilePrinterSoapService.xml "/> </descriptor> <deploymentParameters/> <errorHandling> <errorRateThreshold action="terminate" value="0/1000"/> <maxConsecutiveRestarts action="terminate" value="30"/> <timeout max="100000" default="-1"/> </errorHandling> <checkpoint batch="10000" time="1000ms"/> </casProcessor> </casProcessors> <cpeConfig> <numToProcess>-1</numToProcess> <deployAs>immediate</deployAs> <checkpoint batch="0" time="300000ms"/> <timerImpl/> </cpeConfig> </cpeDescription> When I execute this CPE descriptor in cpeGui.bat those exceptions are thrown: org.apache.uima.collection.metadata.CpeDescriptorException: The object reference casProcessor name=NULL is invalid. (Thread Name: AWT-EventQueue-0) at org.apache.uima.collection.impl.metadata.cpe.CasProcessorCpeObject.setName( CasProcessorCpeObject.java:347) at org.apache.uima.tools.cpm.CpmPanel.addAE(CpmPanel.java:1408) at org.apache.uima.tools.cpm.CpmPanel.openCpeDescriptor( CpmPanel.java:1786) at org.apache.uima.tools.cpm.CpmPanel.readPreferences(CpmPanel.java :538) at org.apache.uima.tools.cpm.CpmPanel.<init>(CpmPanel.java:419) at org.apache.uima.tools.cpm.CpmFrame.<init>(CpmFrame.java:94) at org.apache.uima.tools.cpm.CpmFrame.initGUI(CpmFrame.java:178) at org.apache.uima.tools.cpm.CpmFrame.access$000(CpmFrame.java:49) at org.apache.uima.tools.cpm.CpmFrame$1.run(CpmFrame.java:168) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters( EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter( EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy( EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java :168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java :160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) log4j:WARN No appenders could be found for logger ( org.apache.axis.i18n.ProjectResourceBundle). log4j:WARN Please initialize the log4j system properly. org.apache.uima.resource.ResourceInitializationException: Initialization of CAS Processor with name "AggregateWordsFilePrinterSoapService.xml" failed. at org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize (CollectionProcessingEngine_impl.java:83) at org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine (UIMAFramework_impl.java:395) at org.apache.uima.UIMAFramework.produceCollectionProcessingEngine( UIMAFramework.java:807) at org.apache.uima.tools.cpm.CpmPanel.startProcessing(CpmPanel.java :571) at org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java:105) at org.apache.uima.tools.cpm.CpmPanel$1.construct(CpmPanel.java:711) at org.apache.uima.tools.util.gui.SwingWorker$2.run(SwingWorker.java :130) at java.lang.Thread.run(Thread.java:619) Caused by: org.apache.uima.resource.ResourceConfigurationException: Initialization of CAS Processor with name " AggregateWordsFilePrinterSoapService.xml" failed. at org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor (CPEFactory.java:1104) at org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors( CPEFactory.java:550) at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init( BaseCPMImpl.java:253) at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>( BaseCPMImpl.java:127) at org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize (CollectionProcessingEngine_impl.java:75) ... 7 more Caused by: org.apache.uima.resource.ResourceInitializationException: The Resource Factory does not know how to create a resource of class org.apache.uima.analysis_engine.AnalysisEn the given ResourceSpecifier. (Descriptor: file:/D:/uimaj- 2.2.0-incubating-bin/apache-uima/bin/WordsFilePrinterSoapService.xml) at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java :261) at org.apache.uima.UIMAFramework.produceAnalysisEngine( UIMAFramework.java:352) at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup (ASB_impl.java:243) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB (AggregateAnalysisEngine_impl.java:413) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine (AggregateAnalysisEngine_impl.java:361) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize (AggregateAnalysisEngine_impl.java:183) at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource (AnalysisEngineFactory_impl.java:94) at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource (CompositeResourceFactory_impl.java:62) at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java :258) at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java :303) at org.apache.uima.UIMAFramework.produceAnalysisEngine( UIMAFramework.java:383) at org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor (CPEFactory.java:1088) ... 11 more The aggregate AE descriptor (AggregateWordsFilePrinterSoapService.xml) is: <analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier"> <frameworkImplementation>org.apache.uima.java</frameworkImplementation> <primitive>false</primitive> <delegateAnalysisEngineSpecifiers> <delegateAnalysisEngine key="WordsFilePrinterSoapService"> <import location="WordsFilePrinterSoapService.xml"/> </delegateAnalysisEngine> </delegateAnalysisEngineSpecifiers> </analysisEngineDescription> So what's wrong with those descriptors ? Thanks. Baptiste. 2007/12/4, Baptiste GAILLARD <[EMAIL PROTECTED]>: > > Ok, so I will integrate that SOAP service descriptor inside an Aggregate > AE. > > I'll try that soon. > > Does that answer your question, or did I miss something? > > > Yes, I think it will solve my problems, thank you Marshall !!! > > > Baptiste. > > 2007/12/4, Marshall Schor < [EMAIL PROTECTED]>: > > > > If you a remote SOAP service that is acting as a CAS Consumer, you have > > to put it into your CPE pipeline wrapped inside an Aggregate Analysis > > engine. The aggregate can be a container of just one SOAP component > > (or, if it makes logical sense in your flow - you can add it to the end > > of perhaps some other aggregate you already have in your pipeline). > > > > Does that answer your question, or did I miss something? > > > > -Marshall > > > > Baptiste GAILLARD wrote: > > > Hi Marshall, thanks for your help, > > > > > > Can you clarify how you are trying to use a SOAP AE as a CAS Consumer > > in > > > > > >> a CPE descriptor? > > >> > > >> > > > > > > In fact I was just using the CPE gui tool, I specified in the > > "Analysis > > > Engines" part a SOAP AE descriptor and in the "CAS Consumers" part the > > same > > > SOAP AE descriptor, it works, no problem ! > > > > > > Do you have in the CPE descriptor a <casProcessor ... > element for > > mode > > > > > >> "integrated", which specifies a <descriptor> element which imports a > > >> SOAP remote descriptor? > > >> > > >> If so, that is not supported by the current code - see section > > 3.6.1.1 > > >> where it says, for integrated CAS processors, the referenced > > descriptor > > >> must be an Analysis Engine Descriptor. > > >> > > > > > > > > > Yes, I was trying to do that: > > > > > > -- CpeDescriptor.xml -- > > > ... > > > ... > > > <casProcessors casPoolSize="3" processingUnitThreadCount="1"> > > > ... > > > <casProcessor deployment="integrated" > > name="WordsFilePrinterSOAP"> > > > <descriptor> > > > <import location="WordsFilePrinterSoapService.xml"/> > > > </descriptor> > > > <deploymentParameters/> > > > <errorHandling> > > > <errorRateThreshold action="terminate" > > value="0/1000"/> > > > <maxConsecutiveRestarts action="terminate" > > value="30"/> > > > <timeout max="100000" default="-1"/> > > > </errorHandling> > > > <checkpoint batch="10000" time="1000ms"/> > > > </casProcessor> > > > .... > > > </casProcessors> > > > > > > -- WordsFilePrinterSoapService.xml -- > > > <uriSpecifier xmlns=" http://uima.apache.org/resourceSpecifier"> > > > <resourceType>CasConsumer</resourceType> > > > <uri>http://localhost:8070/axis/services/urn:WordsFilePrinter > > </uri> > > > <protocol>SOAP</protocol> > > > </uriSpecifier> > > > > > > > > > If it's not allowed in UIMA for the moment it is normal if it does not > > work, > > > ok ;-). > > > > > > But, I have only 3 deployment modes: > > > > > > > > >> - > > >> > > >> For *remote* CAS Processors, the referenced descriptor must be a > > >> Vinci *Service Client Descriptor*, which identifies a remotely > > >> deployed CAS Processor service. > > >> - > > >> > > >> For *local* CAS Processors, the referenced descriptor must be a > > >> Vinci *Service Deployment Descriptor*. > > >> - > > >> > > >> For *integrated* CAS Processors, the referenced descriptor must be > > >> an Analysis Engine Descriptor (primitive or aggregate). > > >> > > >> So the only solution to use a SOAP services is "integrated" > > deployment > > >> > > > mode , ok. > > > But I want to use a Cas Consumer SOAP service in my CPE descriptor, is > > it > > > possible ? If not, what is the right thing to do (in the CPE > > decsriptor) to > > > communicate with my remote SOAP Cas Consumers ? > > > > > > Thanks. > > > > > > > > > Baptiste. > > > > > > > > > 2007/12/3, Marshall Schor <[EMAIL PROTECTED]>: > > > > > >> Hi Baptiste - > > >> > > >> Can you clarify how you are trying to use a SOAP AE as a CAS Consumer > > in > > >> a CPE descriptor? > > >> > > >> Do you have in the CPE descriptor a <casProcessor ... > element for > > mode > > >> "integrated", which specifies a <descriptor> element which imports a > > >> SOAP remote descriptor? > > >> > > >> If so, that is not supported by the current code - see section > > 3.6.1.1 > > >> where it says, for integrated CAS processors, the referenced > > descriptor > > >> must be an Analysis Engine Descriptor. > > >> > > >> > > >> > > http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/references/references.html#ugr.ref.xml.cpe_descriptor.descriptor.cas_processors.individual > > >> > > >> If you're doing something else, please let us know. > > >> > > >> Thanks. -Marshall > > >> > > >> Baptiste GAILLARD wrote: > > >> > > >>> Yes, If I use one Analysis Engine and the same Analysis Engine > > instead > > >>> > > >> of a > > >> > > >>> CC the process completed successfully. > > >>> > > >>> > > >>> 2007/12/3, Marshall Schor <[EMAIL PROTECTED]>: > > >>> > > >>> > > >>>> This appears it might be a bug. Can you work around by using an > > >>>> Analysis Engine instead of a Cas Consumer? > > >>>> > > >>>> -Marshall > > >>>> > > >>>> Baptiste GAILLARD wrote: > > >>>> > > >>>> > > >>>>> Ok, thanks, > > >>>>> > > >>>>> I've tried with a SOAP AE and a local integrated CAS Consumer, it > > >>>>> > > >> works. > > >> > > >>>>> But, If If use a SOAP AE an a SOAP Cas Consumer the following > > errors > > >>>>> > > >> are > > >> > > >>>>> displayed: > > >>>>> > > >>>>> > > >>>>> org.apache.uima.resource.ResourceInitializationException: > > >>>>> > > >> Initialization > > >> > > >>>> of > > >>>> > > >>>> > > >>>>> CAS Processor with name "WordsFilePrinterSoapService.xml" failed. > > >>>>> at > > >>>>> > > >>>>> > > >>>>> > > >> > > org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize > > >> > > >>>>> (CollectionProcessingEngine_impl.java:83) > > >>>>> at > > >>>>> > > >>>>> > > >>>>> > > >> > > org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine > > >> > > >>>>> (UIMAFramework_impl.java:395) > > >>>>> at > > >>>>> > > >>>>> > > >>>> org.apache.uima.UIMAFramework.produceCollectionProcessingEngine( > > >>>> > > >>>> > > >>>>> UIMAFramework.java:807) > > >>>>> at org.apache.uima.tools.cpm.CpmPanel.startProcessing( > > >>>>> > > >>>>> > > >>>> CpmPanel.java > > >>>> > > >>>> > > >>>>> :538) > > >>>>> at org.apache.uima.tools.cpm.CpmPanel.access$000( > > CpmPanel.java > > >>>>> > > >>>>> > > >>>> :96) > > >>>> > > >>>> > > >>>>> at org.apache.uima.tools.cpm.CpmPanel$1.construct( > > >>>>> > > >> CpmPanel.java > > >> > > >>>> :678) > > >>>> > > >>>> > > >>>>> at org.apache.uima.tools.util.gui.SwingWorker$2.run ( > > >>>>> > > >>>>> > > >>>> SwingWorker.java > > >>>> > > >>>> > > >>>>> :130) > > >>>>> at java.lang.Thread.run(Thread.java :595) > > >>>>> Caused by: org.apache.uima.resource.ResourceConfigurationException > > : > > >>>>> Initialization of CAS Processor with name " > > >>>>> > > >>>>> > > >>>> WordsFilePrinterSoapService.xml" > > >>>> > > >>>> > > >>>>> failed. > > >>>>> at > > >>>>> > > >>>>> > > >>>>> > > >> > > org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor > > >> > > >>>>> (CPEFactory.java:1107) > > >>>>> at > > >>>>> > > >>>>> > > >>>>> > > >> > > org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors > > ( > > >> > > >>>>> CPEFactory.java:550) > > >>>>> at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init( > > >>>>> BaseCPMImpl.java:253) > > >>>>> at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>( > > >>>>> BaseCPMImpl.java:127) > > >>>>> at > > >>>>> > > >>>>> > > >>>>> > > >> > > org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize > > >> > > >>>>> (CollectionProcessingEngine_impl.java:75) > > >>>>> ... 7 more > > >>>>> Caused by: > > org.apache.uima.resource.ResourceInitializationException: > > >>>>> > > >> The > > >> > > >>>>> Resource Factory does not know how to create a resource of class > > >>>>> org.apache.uima.analysis_engine.AnalysisEngine from > > >>>>> the given ResourceSpecifier. (Descriptor: > > >>>>> > > >>>>> > > >>>>> > > >> > > file:/D:/workspace/imp-helper-uima/src/main/resources/descriptors/soap/WordsFilePrinterSoapService.xml) > > >> > > >>>>> at org.apache.uima.UIMAFramework.produceResource( > > >>>>> > > >>>>> > > >>>> UIMAFramework.java > > >>>> > > >>>> > > >>>>> :261) > > >>>>> at org.apache.uima.UIMAFramework.produceResource( > > >>>>> > > >>>>> > > >>>> UIMAFramework.java > > >>>> > > >>>> > > >>>>> :303) > > >>>>> at org.apache.uima.UIMAFramework.produceAnalysisEngine( > > >>>>> UIMAFramework.java:383) > > >>>>> at > > >>>>> > > >>>>> > > >>>>> > > >> > > org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor > > >> > > >>>>> (CPEFactory.java:1091) > > >>>>> ... 11 more > > >>>>> > > >>>>> So, it seams to work with SOAP AE but not SOAP CC. > > >>>>> > > >>>>> > > >>>>> Baptiste. > > >>>>> > > >>>>> > > >>>>> 2007/11/29, Adam Lally <[EMAIL PROTECTED]>: > > >>>>> > > >>>>> > > >>>>> > > >>>>>> On Nov 29, 2007 10:37 AM, Baptiste GAILLARD < > > >>>>>> > > >>>>>> > > >>>> [EMAIL PROTECTED]> > > >>>> > > >>>> > > >>>>>> wrote: > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>>> <?xml version="1.0" encoding="UTF-8"?> > > >>>>>>> <casProcessor deployment="remote" > > >>>>>>> name="WordsListAnnotatorSoapService"> > > >>>>>>> <descriptor> > > >>>>>>> <include > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >> > > href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsListAnnotatorSoapService.xml"/> > > >> > > >>>>>>> </descriptor> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>> <snip/> > > >>>>>> > > >>>>>> Use deployment="integrated" instead of deployment="remote". I > > know > > >>>>>> that's confusing. Using deployment="integrated" will actually > > work > > >>>>>> just fine for remote services. deployment="remote" invokes some > > >>>>>> specialized processing specifically for Vinci services, but is > > not > > >>>>>> generally needed. > > >>>>>> > > >>>>>> -Adam > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > > >>> > > >> > > > > > > > > > > >
