From uima-user-return-2739-apmail-incubator-uima-user-archive=incubator.apache.org@incubator.apache.org Mon Dec 14 14:30:17 2009 Return-Path: Delivered-To: apmail-incubator-uima-user-archive@minotaur.apache.org Received: (qmail 86561 invoked from network); 14 Dec 2009 14:30:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Dec 2009 14:30:16 -0000 Received: (qmail 29362 invoked by uid 500); 14 Dec 2009 14:30:16 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 29304 invoked by uid 500); 14 Dec 2009 14:30:15 -0000 Mailing-List: contact uima-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: uima-user@incubator.apache.org Delivered-To: mailing list uima-user@incubator.apache.org Received: (qmail 29294 invoked by uid 99); 14 Dec 2009 14:30:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Dec 2009 14:30:14 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of christoph@neofonie.de designates 91.213.91.143 as permitted sender) Received: from [91.213.91.143] (HELO ns.neofonie.de) (91.213.91.143) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Dec 2009 14:30:04 +0000 Received: from [172.27.27.76] (helo=perseus.exchange.neofonie.de) by ns.neofonie.de with esmtp (Exim 4.63) (envelope-from ) id 1NKBvk-0007o5-6v for uima-user@incubator.apache.org; Mon, 14 Dec 2009 15:29:44 +0100 Received: from [172.27.40.211] ([172.27.40.211]) by perseus.exchange.neofonie.de with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Dec 2009 15:29:36 +0100 Message-ID: <4B264BD7.8020101@neofonie.de> Date: Mon, 14 Dec 2009 15:29:43 +0100 From: =?UTF-8?B?Q2hyaXN0b3BoIELDvHNjaGVy?= User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: uima-user@incubator.apache.org Subject: Re: Problems with "deserializeCasFromXmi" after using C++ AS Annotator References: <4B20FD72.6020805@neofonie.de> <4B21171E.8080702@neofonie.de> <4B225181.3020907@gmx.de> In-Reply-To: Content-Type: multipart/mixed; boundary="------------060500070400020708050900" X-OriginalArrivalTime: 14 Dec 2009 14:29:36.0656 (UTC) FILETIME=[DCB46100:01CA7CC9] X-Virus-Checked: Checked by ClamAV on apache.org --------------060500070400020708050900 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, I did some further testing and the problem seems to happen when the FS is not declared in the remote C++ TAE but declared and set in an AE in the (lokal) main application (in out case a CPE running various Java AEs). In my unit test I create a "DummyAE" descriptor basically doing nothing but declaring a "DocumentData" type with the URL Feature. I also created a customResourceSpecifier pointing to the DAVEDETECTORQ on the remote system. My test looks like this: public class RemoteCTaeTest { private AnalysisEngine daveAe; private AnalysisEngine myAe; /** * @throws java.lang.Exception */ @Before public void setUp() throws Exception { URL daveResource = RemoteCTaeTest.class.getClassLoader().getResource("DaveResource.xml"); URL myResource = RemoteCTaeTest.class.getClassLoader().getResource("DummyAE.xml"); ResourceSpecifier res = UIMAFramework.getXMLParser().parseResourceSpecifier( new XMLInputSource(daveResource)); AnalysisEngineDescription aeDesc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription( new XMLInputSource(myResource)); this.daveAe = UIMAFramework.produceAnalysisEngine(res); this.myAe = UIMAFramework.produceAnalysisEngine(aeDesc); } /** * @throws Exception */ @Test public void testSendCAS() throws Exception { CAS cas = CasCreationUtils.createCas(Arrays.asList(new AnalysisEngineMetaData[] { this.daveAe.getAnalysisEngineMetaData(), this.myAe.getAnalysisEngineMetaData() })); JCas cas2 = cas.getJCas(); DocumentData metadata = new DocumentData(cas2); metadata.setDocumentURL("http://www.gesundheitsnachrichten.net/live/navigation/live.php?navigation_id=11&_psmand=1"); String text = "This is a Dave Test."; cas2.setDocumentText(text); cas2.addFsToIndexes(metadata); this.daveAe.process(cas2); System.out.print(cas2.getJFSIndexRepository().getAllIndexedFS(DocumentData.type).next()); } } The test fails when I used the DaveDetector descriptor delivered with "2.2.2-incubating". When I add DocumentData type to the DaveDetector descriptor, the test succeeds and the URL is returned correctly by the remote AE: (../examples/descriptors/DaveDetector.xml) org.apache.uima.examples.David uima.tcas.Annotation de.neofonie.DocumentData Metadata for a document uima.cas.TOP documentURL The original URL of the document uima.cas.String I will attach both descriptors used in the test. The implementation of the DummyAE is completely empty, since it is not called in the test. From my UIMA understanding so far a remote AS service shouldn't have to declare or import all types and type systems by potential AE clients connecting to it, or am I wrong in this regard? I attached the descriptors used in the Junit test above. Hope this helps. I will continue to try to reproduce the problem using CVD. Christoph Eddie Epstein schrieb: > Hi, > > Well, I tried another, simpler scenario based on your description: > > Just add the following to DaveDetector.xml: > > uima.tcas.Chris > > uima.tcas.Annotation > > > documentURL > > uima.cas.String > > > > > Create the following CasXmi file: > > xmlns:tcas="http:///uima/tcas.ecore" > xmlns:xmi="http://www.omg.org/XMI" xmi:version="2.0"> > > mimeType="text" sofaString="This is a text document with Dave for > analysis"/> > > documentURL="http://www.gesundheitsnachrichten.net/live/navigation/live.php?navigation_id=11&_psmand=1"/> > > > > Launch the unaltered DaveDetector as a service, have CVD connect to it > via JMS service descriptor, use File->Read Xmi Cas File to load the test Cas, > use Run->Run DaveDetector On CAS to call the remote service, and, finally > expand the annotation index to see the results. No problems. > > This was using something close to uima-2.3.0. > > Eddie > > > > On Fri, Dec 11, 2009 at 9:04 AM, Christoph Buescher > wrote: >> Hi Eddie, >> >> unfortunately I'm out of the office today so I can only send you the unit >> test reproducing the problem on monday. But our scenario is more or less the >> following: >> >> - A CPE running several Java AEs first, then send the CAS to a remote AS >> Service which is a C++ AE >> - the collection reader adds a FS with document metadata (including the >> String Feature "URL") to the CAS. This FS directly extends the Top-Type, not >> Annotation. >> - I used the unaltered DaveDetector to replace our own C++ AE to reproduce >> the problem >> >> For the unit test I wrote a "No-OP" Java AE which uses a Typesystem only >> including this "DocumentData" FS with only this one String Feature. I used a >> Custom Resource Specifier like in the AS Documentation to reference the >> DaveDetector on a remote machine. I then create a CAS using the >> CasCreationUtil which in turn uses the "No-OP" AE descriptor and the >> DaveDetector-Resource Specifier. I then add the problematic Feature in >> question and call "process" on the remote Dave-AE. Then the exception I >> mentioned in my earlier mail happens. >> >> I will send you the test code on monday and also try to use CVD to reproduce >> the problem. >> >> Thanks, >> Christoph --------------060500070400020708050900 Content-Type: text/xml; name="DaveResource.xml" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="DaveResource.xml" PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiID8+CjxjdXN0b21SZXNvdXJj ZVNwZWNpZmllciB4bWxucz0iaHR0cDovL3VpbWEuYXBhY2hlLm9yZy9yZXNvdXJjZVNwZWNp ZmllciI+CiAgPHJlc291cmNlQ2xhc3NOYW1lPm9yZy5hcGFjaGUudWltYS5hYWUuam1zX2Fk YXB0ZXIuSm1zQW5hbHlzaXNFbmdpbmVTZXJ2aWNlQWRhcHRlcjwvcmVzb3VyY2VDbGFzc05h bWU+CiAgPHBhcmFtZXRlcnM+CiAgICA8cGFyYW1ldGVyIG5hbWU9ImJyb2tlclVSTCIgdmFs dWU9InRjcDovL215SG9zdDo2MTYxNiIvPgogICAgPHBhcmFtZXRlciBuYW1lPSJlbmRwb2lu dCIgdmFsdWU9IkRBVkVERVRFQ1RPUlEiLz4KICA8L3BhcmFtZXRlcnM+IAo8L2N1c3RvbVJl c291cmNlU3BlY2lmaWVyPg== --------------060500070400020708050900 Content-Type: text/xml; name="DummyAE.xml" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="DummyAE.xml" org.apache.uima.java true DummyAE DummyAE For testing purposes only. 1.0 de.neofonie.DocumentData Metadata for a document uima.cas.TOP documentURL The original URL of the document uima.cas.String false true false --------------060500070400020708050900--