Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6953918B9E for ; Sun, 12 Jul 2015 18:49:17 +0000 (UTC) Received: (qmail 34780 invoked by uid 500); 12 Jul 2015 18:49:17 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 34736 invoked by uid 500); 12 Jul 2015 18:49:17 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 34724 invoked by uid 99); 12 Jul 2015 18:49:16 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jul 2015 18:49:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7EB831817A5 for ; Sun, 12 Jul 2015 18:49:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.881 X-Spam-Level: * X-Spam-Status: No, score=1.881 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-1.108, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Gcd6hh9ehHHC for ; Sun, 12 Jul 2015 18:49:14 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id CF57B43DF7 for ; Sun, 12 Jul 2015 18:49:13 +0000 (UTC) Received: from [192.168.178.29] ([46.244.157.230]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LlUZz-1YfqIs2ZXD-00bKZn; Sun, 12 Jul 2015 20:49:02 +0200 Content-Type: multipart/alternative; boundary="Apple-Mail=_90666511-F546-439D-ADD8-210A1FD93BC0" Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: NPE when trying to get casProcessors from CPE description From: Martin Wunderlich In-Reply-To: <29633835-E0D7-44A1-90AA-CD1B6159BAEF@gmx.net> Date: Sun, 12 Jul 2015 20:49:00 +0200 Cc: dkpro-tc-users@googlegroups.com Message-Id: References: <5E86035F-5381-426A-A221-835CA6C85FB6@gmx.net> <601FBEB5-6F01-484C-908A-CF62C5543DA6@gmx.net> <29633835-E0D7-44A1-90AA-CD1B6159BAEF@gmx.net> To: user@uima.apache.org X-Mailer: Apple Mail (2.2070.6) X-Provags-ID: V03:K0:l6UqCSyQOM4z6u1pLqJ428Dweknpg98NI+NJA71/utLcaWwZOU5 +OpOsVYzmS+NjHUv+QWmuIzpTrW2pjpMShID/n5CZ+Pi4xy/PaBK+CGa1vy4Tv642B3wdRU xREJrUqUytUDF3JaL2ba21/PRmwAMVCUL6mFgojZKFn1mDb0Sjxt5vqxKowroPu4sLHujNk Rw36U8vyyXqxfE4BCoCZw== X-UI-Out-Filterresults: notjunk:1;V01:K0:EIwEx8GsSj0=:TL5Ent0Vm3BvZqGwclTycf RoHjJXtFzsd8HnfCJh9Yz0MEZoPmyFYzmM6sIV+/0kYQd6OAlzJpum7UtSplFa8jhrEFbx6B1 2HWecmrkDINO3HZCfkN6BA4ysnr8q7t+cchfGQ9Lphe+dnfLKbBmL+FLDmHCZYOpaAY/RGB4k WsZwksDjErSmdVH/1PCVqfzMIZHtV6Od1gUT2mvVG43sFMDEPR5dDH770f8lDKq4RKMlA35vq 7S6fKHwqnAcCEqlVFY5X+cI6AsHGpoBQO1MhHvnIFQTYNYtzaSqFgHiP0vOBVTlPrcjg2fmF1 QmO1rNC7vs4SXXuIMsKzSMtn5AOS/d9BA/z6b6SwhUPJytFUOFhPZvo7WjUWzDEVeypMl95Nl jk2Gci2N7nFTJA/5lOMpUo7S9eMuXDO6hMFaJ2YD6sYjQVnTXrmBsLgB7p0ivR/VnCnhJQ1DQ r0F0Nte8hgwJtdm88WVCtizqXh9Afwqzd4Puu+LMfZlBLiSOgIdy01RjlGc32VdNy/hnIKpOO VPlGLi82Ecc2qowEtBiPlFfDPR9Tk9TNXsYKzT//J377h5y5YJTI7gxMh08K3TskwpG3oxm5h JVHsMD/OAdrs+iiCuPWC8gxs8UszSNwOsgbBYYcOxTHHTAtrz3aK6sD7MKCLkuOvQICdIpNkQ HpqrsEDdlUwOJaCJj1VlQzpOkv6FMWtQirF/4MBlIKT6CH79aChxdT9Al2wqMneFhOKg= --Apple-Mail=_90666511-F546-439D-ADD8-210A1FD93BC0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Hi,=20 I just want to briefly reveal how this situation has been resolved.=20 First, Richard was so kind to contact me via chat to check the Maven = dependencies. We discovered that two different versions of DKPro Lab = were referenced (one of them rather indirectly, from the similarity = project). Richard quickly resolved this with a commit and I re-installed = the snapshot version locally. However, this didn=92t fix this situation = listed below. But kudos to Richard who helped out and made me feel less = lonely on this hot summer sunday.=20 As a next step, I tried to isolate the problem. So, I cloned the TC = github repo, imported that into a new Eclipse workspace and ran the = example there. This worked. So, I figured it might be something in my = particular workspace arrangement. I had my forked TC project loaded = there, which I now set to the master branch of the original repo=92s = snapshot version. This didn=92t help either. Then, I re-installed the = newly cloned version using maven install, removed the TC project from = the eclipse workspace, imported only the examples project and ran the = example again. Now it worked. I went back to my actual project and - lo = and behold - the pair-wise classification now worked, too.=20 I still don=92t know what caused the problem. It might have been some of = my code changes or config changes to the forked copy of the project. = Anyway, I am documenting this here in case someone else runs into a = similar situation.=20 Cheers,=20 Martin =20 > Am 12.07.2015 um 16:39 schrieb Martin Wunderlich : >=20 > As a side-note*, the problem does not occur when I run the experiment = from the branch of the 0.7.0 tag version of DKPro TC. In that version, = PairTwentyNewsgroupsDemo runs fine without the NPE. Not sure, if this = observation adds to the clarification or rather to the confusion.=20 >=20 > Cheers,=20 >=20 > Martin >=20 > * (and we should probably move this conversation to the DKpro list, = which I am putting on CC now, so feel free to respond there) > =20 >=20 >> Am 12.07.2015 um 13:23 schrieb Martin Wunderlich >: >>=20 >> Hi Richard,=20 >>=20 >> I have based this experiment on the PairTwentyNewsgroupsDemo from the = DKPro examples. The CPE would be build during the experiment execution, = I guess.=20 >>=20 >> I have just tried to re-run the example, but now I am getting the = same exception:=20 >> (using the 0.8.0 snapshort version of TC).=20 >>=20 >> 2015-07-12 11:01:31 DEBUG [main] (DefaultLoggingService) - = [MetaInfoTask-TwentyNewsgroupsTrainTest-966ab1a7-2874-11e5-b53c-37fcf6476d= 26] Problem stack trace: >> java.lang.NullPointerException >> at = org.apache.uima.fit.cpe.CpeBuilder.createCpe(CpeBuilder.java:159) >> at = de.tudarmstadt.ukp.dkpro.lab.uima.engine.cpe.CpeExecutionEngine.run(CpeExe= cutionEngine.java:93) >> at = de.tudarmstadt.ukp.dkpro.lab.task.impl.BatchTask.runNewExecution(BatchTask= .java:350) >> at = de.tudarmstadt.ukp.dkpro.lab.task.impl.BatchTask.executeConfiguration(Batc= hTask.java:255) >> at = de.tudarmstadt.ukp.dkpro.lab.task.impl.BatchTask.execute(BatchTask.java:18= 5) >> at = de.tudarmstadt.ukp.dkpro.tc.ml.ExperimentTrainTest.execute(ExperimentTrain= Test.java:91) >> at = de.tudarmstadt.ukp.dkpro.lab.engine.impl.ExecutableTaskEngine.run(Executab= leTaskEngine.java:55) >> at = de.tudarmstadt.ukp.dkpro.lab.engine.impl.DefaultTaskExecutionService.run(D= efaultTaskExecutionService.java:48) >> at de.tudarmstadt.ukp.dkpro.lab.Lab.run(Lab.java:97) >> at = de.tudarmstadt.ukp.dkpro.tc.examples.single.pair.PairTwentyNewsgroupsDemo.= runTrainTest(PairTwentyNewsgroupsDemo.java:147) >> at = de.tudarmstadt.ukp.dkpro.tc.examples.single.pair.PairTwentyNewsgroupsDemo.= main(PairTwentyNewsgroupsDemo.java:84) >>=20 >> Cheers,=20 >>=20 >> Martin >> =20 >>=20 >>=20 >>> Am 11.07.2015 um 19:10 schrieb Richard Eckart de Castilho = >: >>>=20 >>> Hi, >>>=20 >>> how to you build your CPE? The CAS processors should be set during = setAnalysisEngine(...). >>>=20 >>> Cheers, >>>=20 >>> -- Richard=20 >>>=20 >>> On 11.07.2015, at 10:18, Martin Wunderlich > wrote: >>>=20 >>>> Hi all,=20 >>>>=20 >>>> I am trying to run a pair-wise classification experiment using the = DKPro TC framework. The execution fails during the meta-info stage due = to a NullPointerException that originates in the CpeBuilder class from = UIMAfit v.2.1.0 (hence the post to this list and not the DKpro list). I = had a closer look at the code and the NPE is triggered at the following = line in the CpeBuilder:=20 >>>>=20 >>>> = cpeDesc.getCpeCasProcessors().setPoolSize(maxProcessingUnitThreadCount + = 2); >>>>=20 >>>> The underlying root cause is that the casProcessors object returned = by the call to cpeDesc is Null, but I don=92t understand why. The = cpeDesc lists a number of fields as having Null values:=20 >>>>=20 >>>> org.apache.uima.collection.impl.metadata.cpe.CpeDescriptionImpl:=20 >>>> casInitializer =3D NULL >>>> configParameterSettings =3D NULL >>>> configurationParameterSettings =3D NULL >>>> import =3D NULL >>>> sofaNameMappings =3D NULL >>>> configurationParameterSettings =3D NULL >>>> cpeCasProcessors =3D NULL >>>> outputQueue =3D NULL >>>> startAt =3D NULL >>>> startingEntityId =3D NULL >>>>=20 >>>>=20 >>>> Unfortunately, I am not too familiar with the inner workings of the = UIMA(fit) framework so I am not sure how, why and where these fields = were set to Null.=20 >>>> Could someone perhaps point me in the right direction where I = should dig deeper to identify the cause for this problem?=20 >>>>=20 >>>> Thanks a lot.=20 >>>>=20 >>>> Cheers,=20 >>>>=20 >>>> Martin >>>=20 >>=20 >=20 --Apple-Mail=_90666511-F546-439D-ADD8-210A1FD93BC0--