Egbert van der Wal | 28 Jul 17:46 2014
Picon

UIMA AS NullPointerException in CasDefinition constructor

Hi,

 

I'm trying to convert an existing and functional UIMA pipeline to a UIMA AS pipeline.

 

I'm getting there, I created deployment descriptors for the annotators and when running my application all individual annotators are launched correctly. The composite analysis engine also loads fine but I'm getting a NullPointerException when calling initialize(deployCtx) on the UimaAsEngine on line 66. See the attached text document for the full exception.

 

 

I found a similar issue in the bug tracker which was fixed in UIMA AS 2.3:

 

https://issues.apache.org/jira/browse/UIMA-1376

 

But this seems to arise in mergeTypeSystem and this does not seem to be the case in my situation. The line number is the same however.

 

Any clues on where I should look for the solution? Are my descriptors faulty? Is the Java code faulty? Or is this a bug in UIMA AS 2.4.0? How can I debug this issue?

 

Thanks,

 

Egbert

 

 

Jul 28, 2014 5:10:24 PM org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl setupConnection
INFO: UIMA AS Client Created Shared Connection To Broker: tcp://localhost:61616
Jul 28, 2014 5:10:24 PM org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl initializeProducer
INFO: Initializing JMS Message Producer. Broker: tcp://localhost:61616 Queue Name: SpotterQueue
Jul 28, 2014 5:10:24 PM org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl initializeConsumer
INFO: Initializing JMS Message Consumer. Broker: tcp://localhost:61616 Queue Name: ID:Idefix-51211-1406560187218-0:51:1
Jul 28, 2014 5:10:24 PM org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl notifyOnInitializationFailure
WARNING: Top Level Controller Initialization Exception.
java.lang.NullPointerException
        at org.apache.uima.resource.CasDefinition.<init>(CasDefinition.java:66)
        at org.apache.uima.resource.impl.CasManager_impl.getCasDefinition(CasManager_impl.java:95)
        at org.apache.uima.resource.impl.CasManager_impl.createNewCas(CasManager_impl.java:198)
        at org.apache.uima.util.CasPool.fillPool(CasPool.java:315)
        at org.apache.uima.util.CasPool.<init>(CasPool.java:187)
        at org.apache.uima.resource.impl.CasManager_impl.defineCasPool(CasManager_impl.java:176)
        at org.apache.uima.resource.impl.CasManager_impl.defineCasPool(CasManager_impl.java:153)
        at org.apache.uima.aae.EECasManager_impl.defineCasPool(EECasManager_impl.java:56)
        at org.apache.uima.aae.AsynchAECasManager_impl.initialize(AsynchAECasManager_impl.java:97)
        at org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.initialize(BaseUIMAAsynchronousEngine_impl.java:765)
        at nl.novay.keywordSpotter.KeywordSpotterAS.initializeEngine(KeywordSpotterAS.java:576)
        at nl.novay.keywordSpotter.KeywordSpotterAS.run(KeywordSpotterAS.java:507)
        at nl.novay.keywordSpotter.KeywordSpotterAS.main(KeywordSpotterAS.java:374)

org.apache.uima.resource.ResourceInitializationException
        at org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.initialize(BaseUIMAAsynchronousEngine_impl.java:794)
        at nl.novay.keywordSpotter.KeywordSpotterAS.initializeEngine(KeywordSpotterAS.java:576)
        at nl.novay.keywordSpotter.KeywordSpotterAS.run(KeywordSpotterAS.java:507)
        at nl.novay.keywordSpotter.KeywordSpotterAS.main(KeywordSpotterAS.java:374)
Caused by: java.lang.NullPointerException
        at org.apache.uima.resource.CasDefinition.<init>(CasDefinition.java:66)
        at org.apache.uima.resource.impl.CasManager_impl.getCasDefinition(CasManager_impl.java:95)
        at org.apache.uima.resource.impl.CasManager_impl.createNewCas(CasManager_impl.java:198)
        at org.apache.uima.util.CasPool.fillPool(CasPool.java:315)
        at org.apache.uima.util.CasPool.<init>(CasPool.java:187)
        at org.apache.uima.resource.impl.CasManager_impl.defineCasPool(CasManager_impl.java:176)
        at org.apache.uima.resource.impl.CasManager_impl.defineCasPool(CasManager_impl.java:153)
        at org.apache.uima.aae.EECasManager_impl.defineCasPool(EECasManager_impl.java:56)
        at org.apache.uima.aae.AsynchAECasManager_impl.initialize(AsynchAECasManager_impl.java:97)
        at org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.initialize(BaseUIMAAsynchronousEngine_impl.java:765)
        ... 3 more
Nick Nikandish | 28 Jul 17:32 2014

CAS to RDF


Hi there,

I am able to generate an XML file from a CAS using CasToInlineXML() class. I was wondering if there was any
class or method  in UIMA that we can generate RDF files from a CAS?

Thanks,
Nick

Armin.Wegner | 28 Jul 14:55 2014
Picon

Lucas

Hi!

Is someone using Lucas? It seems to be slightly outdated. It depends on Lucene 2.9.3. Lucene is at version
4.9.0 right now. Is there an alternative?

Regards,
Armin

James Baker | 24 Jul 14:16 2014
Picon

Passing additional parameters through to CPE components

Is it possible to provide additional configuration parameters in a CPE
descriptor XML file that aren't specified in the annotator/collection
reader descriptor XML file?

I have a collection reader that accepts the classname of a class to use to
do the content extraction as a parameter. This works fine, but I'd like to
be able to pass additional parameters to the content extractor via the XML.
The parameters will be dependant on the content extractor though, so I
can't specify them in the collection reader descriptor. For example,
ContentExtractor1 might need a parameter 'encoding', and ContentExtractor2
might need a parameter 'baseUrl'.

I have been able to achieve this with UimaFIT by creating the collection
reader without the XML and injecting the parameters, but when I try and do
it from the XML file the parameters don't make it through to my content
extractor (I pass the UimaContext object through to the content extractor).
I suspect they might be being ignored by UIMA because they aren't in the
descriptor. How can I work around this?

Thanks,
James
James Baker | 24 Jul 14:19 2014
Picon

Passing additional parameters through to CPE components

Is it possible to provide additional configuration parameters in a CPE
descriptor XML file that aren't specified in the annotator/collection
reader descriptor XML file?

I have a collection reader that accepts the classname of a class to use to
do the content extraction as a parameter. This works fine, but I'd like to
be able to pass additional parameters to the content extractor via the XML.
The parameters will be dependant on the content extractor though, so I
can't specify them in the collection reader descriptor. For example,
ContentExtractor1 might need a parameter 'encoding', and ContentExtractor2
might need a parameter 'baseUrl'.

I have been able to achieve this with UimaFIT by creating the collection
reader without the XML and injecting the parameters, but when I try and do
it from the XML file the parameters don't make it through to my content
extractor (I pass the UimaContext object through to the content extractor).
I suspect they might be being ignored by UIMA because they aren't in the
descriptor. How can I work around this?

Thanks,
James
Dr. Armin Wegner | 24 Jul 09:53 2014

DKpro StanfordNamedEntityRecognizer ClassCastException

Hi!

I tried to do the introductory example for DKpro. But DKpro's
StanfordNamedEntityRecognizer throws a ClassCastException. Any ideas?
I had to replace some code snippets with [...].

Thanks
Armin

Jul 24, 2014 9:27:42 AM
de.tudarmstadt.ukp.dkpro.core.api.resources.ResourceObjectProviderBase
loadResource
INFO: Producing resource from
[jar:file:[...].jar!/de/tudarmstadt/ukp/dkpro/core/stanfordnlp/lib/ner-en-all.3class.distsim.crf.ser.gz]
redirected from
[jar:file:[...].jar!/de/tudarmstadt/ukp/dkpro/core/stanfordnlp/lib/ner-en-all.3class.distsim.crf.properties]
Jul 24, 2014 9:27:45 AM
de.tudarmstadt.ukp.dkpro.core.api.resources.ResourceObjectProviderBase
loadResource
INFO: Producing resource from
jar:file:[...]!/de/tudarmstadt/ukp/dkpro/core/stanfordnlp/lib/ner-en-all.3class.distsim.crf.map
Jul 24, 2014 9:27:45 AM
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl
callAnalysisComponentProcess(417)
SEVERE: Exception occurred
org.apache.uima.analysis_engine.AnalysisEngineProcessException:
Annotator processing failed.
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:309)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:569)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:411)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:266)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:569)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:411)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:266)
	at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)
	at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:150)
	at [...].Pipeline.run(Pipeline.java:59)
	at [...].Main.main(Main.java:33)
Caused by: java.lang.ClassCastException:
org.apache.uima.cas.impl.AnnotationImpl cannot be cast to
de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity
	at de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordNamedEntityRecognizer.process(StanfordNamedEntityRecognizer.java:188)
	at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
	... 13 more

Jul 24, 2014 9:27:45 AM
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl
processAndOutputNewCASes(274)
SEVERE: Exception occurred
org.apache.uima.analysis_engine.AnalysisEngineProcessException:
Annotator processing failed.
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:309)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:569)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:411)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:266)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:569)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:411)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:266)
	at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)
	at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:150)
	at [...].Pipeline.run(Pipeline.java:59)
	at [...].Main.main(Main.java:33)
Caused by: java.lang.ClassCastException:
org.apache.uima.cas.impl.AnnotationImpl cannot be cast to
de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity
	at de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordNamedEntityRecognizer.process(StanfordNamedEntityRecognizer.java:188)
	at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
	... 13 more

Jul 24, 2014 9:27:45 AM
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl
processAndOutputNewCASes(274)
SEVERE: Exception occurred
org.apache.uima.analysis_engine.AnalysisEngineProcessException:
Annotator processing failed.
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:309)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:569)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:411)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:266)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:569)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:411)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:266)
	at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)
	at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:150)
	at [...].Pipeline.run(Pipeline.java:59)
	at [...].Main.main(Main.java:33)
Caused by: java.lang.ClassCastException:
org.apache.uima.cas.impl.AnnotationImpl cannot be cast to
de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity
	at de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordNamedEntityRecognizer.process(StanfordNamedEntityRecognizer.java:188)
	at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
	... 13 more

Exception in thread "main"
org.apache.uima.analysis_engine.AnalysisEngineProcessException:
Annotator processing failed.
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:309)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:569)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:411)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:266)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:569)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:411)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:266)
	at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)
	at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:150)
	at [...].Pipeline.run(Pipeline.java:59)
	at [...].Main.main(Main.java:33)
Caused by: java.lang.ClassCastException:
org.apache.uima.cas.impl.AnnotationImpl cannot be cast to
de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity
	at de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordNamedEntityRecognizer.process(StanfordNamedEntityRecognizer.java:188)
	at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
	... 13 more

Armin.Wegner | 22 Jul 17:05 2014
Picon

uimaFIT - types.txt

Hi,

The final runnable jar contains the META-INF/org.apache.uima.fit/types.txt from a maven dependency
and not from the project itself. Can something be done about this?

Cheers
Armin

Egbert van der Wal | 22 Jul 08:51 2014
Picon

Building UIMA-CPP on (K)Ubuntu 14.04

Hi,

I've been trying to add an annotator in C++ to an Annotation Engine in Java. 
However, building UIMA-CPP is not a trivial task, so it seems.

So far, I've identified dependencies on ActiveMQ-CPP, APR, a Java JRE, Xerces 
and ICU. Maybe there's more key dependencies but those do not appear to be a 
problem on Ubuntu.

libxerces was easy to fix as a compatible version is in the Ubuntu repository.

APR is harder: Ubuntu 14.04 ships with 1.5.x while the configure script checks 
for 1.2, 1.3 or 1.4. Hacking the configure-script to also accept 1.5.x works 
but I didn't get to compiling yet so I don't know about the API-differences 
and if this will work.

ActiveMQ-CPP is not in the Ubuntu repository. I had to locate and built this 
myself, but this actually didn't prove to be so hard.

ICU is harder. The configure script wants a --with-icu path, but then assumes 
other facts. In Ubuntu, icu-config is located in /usr/bin while the header 
filers are located in /usr/include/x86-64-linux-gnu/unicode/. The configure-
script seems to have problems to recognize this difference. I would've thought 
that just having the icu-config script in the path would be sufficient, as 
icu-config spits out the rest of the required information, but this doesn't 
seem to be the case.

Java JRE is also a problem. It wants jni.h but is not able to locate it. 
Ubuntu installs JREs in /usr/lib/jvm/≤name of JVM>/ but specyfing, for 
example, --with-jre=/usr/lib/jvm/java-7-oracle/ or --with-
jre=/usr/lib/jvm/java-7-openjdk-amd64/ does not work.

The corresponding locations on my system of jni.h are:

/usr/lib/jvm/java-7-openjdk-amd64/include/jni.h
/usr/lib/jvm/java-7-oracle/include/jni.h

Is there anyone that succesfully built UIMACPP 2.4 on Ubuntu 14.04? Is there a 
new version of UIMACPP available that works better on Ubuntu 14.04? Does 
anyone know of a PPA providing compiled UIMACPP packages for Ubuntu 14.04?

Thanks for any assistance!

Kind regards,

Egbert van der Wal

Jaroslaw Cwiklik | 17 Jul 19:51 2014
Picon

[ANNOUNCE] Apache UIMA-AS 2.6.0 released

The Apache UIMA team is pleased to announce the release of version 2.6.0 of
the Apache
UIMA AS, which includes asynchronous scaleout capabilities for the UIMA
annotators.

The UIMA AS 2.6.0 binaries and source are available for download from:
http://uima.apache.org/downloads.cgi

UIMA AS includes the base UIMA SDK and augments it with scaleout
capability; it is a next-generation replacement for the original CPM
(Collection Processing Management) scaleout that is part of the core UIMA
Framework. For more information, please visit:

http://uima.apache.org/doc-uimaas-what.html

This release contains a number of improvements and bug fixes. Notable
updates
in this release include:

- Replaced ActiveMQ version 5.6.0 with version 5.7.0

- Added HTTP support

- Improved error handling and recovery

- Performance improvements

For a complete list of bugs and improvements included in this release
please see
https://uima.apache.org/d/uima-as-2.6.0/issuesFixed/jira-report.html.

-- Jerry Cwiklik, for the Apache UIMA Development Team
Markus K. | 10 Jul 12:35 2014
Picon

UIMA CAS Editor question

Hi,

Lately i encountered a problem including the CAS-Editor.
Its more a development question, ill go more into detail:

I wrote a view which is able to display some Annotations of the same Type.
Its intention is to apply a given action to those Annotations one by one. As
soon a user finished the changes of a given Annotation [Problem Start] I
want the CAS editor to Highlight ( or mark whatever it is called when you
mark some text with your mouse) the next Annotation of the given Type BUT it
should not move the cursor ( or scroll) to that Annotation ( User should
scroll by himself) [Problem End] All i found was the selectAndReveal method
but it also moves the cursor to the said Annotation. If anyone knows a
solution to that issue i would be very thankful

Markus K.

Debbie Zhang | 9 Jul 13:41 2014
Picon

Read file name in an annotator

Hi,

Can anyone tell me how to read the file name in an annotator using the
JCas? It seems the DocumentAnnotation does't contain file name. Thank
you!

Best regards,

Debbie Zhang


Gmane