This error happens (I'm reading from the stack trace) in

ConceptMapper's typeSystemInit method, on line (ConceptMapper.java:418)

Looking at that line in the source code:
resultAnnotationType = typeSystem.getType(resultAnnotationName);

The NPE is thrown if the value of the string "resultAnnotationName" is null.

This is, according to the source code, set from a "configuration parameter" 
named "ResultingAnnotationName".

So, I'm guessing your setup isn't specifying this configuration parameter.

Let us know if specifying this and related features (see 
https://uima.apache.org/d/uima-addons-current/ConceptMapper/ConceptMapperAnnotatorUserGuide.html#configParams
) fixes this.

-Marshall Schor


On 5/31/2019 1:27 PM, Chinyere O. wrote:
> Hi,
>
> I’m new to UIMA and I’m trying to get the concept mapper to run. I’ve 
> downloaded the concept mapper bin file, added all the parameter files, and 
> the jar packages to the class path. Could someone help me figure out what I’m 
> doing wrong.
>
> Thank you,
> Chinyere
>
> Error Log:
> 08:09:20.573 - 16: org.apache.uima.conceptMapper.Logger.log(46): INFO: 
> ConceptMapper INFO: Loading Dictionary from 
> file:/C:/Users/Chinyere/eclipse_workspace_2018/NYUW_PathReader/resources/PathologyBiomakers.xml
> 08:09:20.579 - 16: org.apache.uima.conceptMapper.Logger.log(46): INFO: 
> ConceptMapper INFO: Loading dictionary
> 08:09:20.671 - 16: org.apache.uima.jcas.impl.JCasImpl.reportInitErrors(809): 
> WARNING:
> JCas Type "org.apache.uima.conceptMapper.support.tokenizer.TokenAnnotation" 
> implements getters and setters for feature "tokenType", but the type system 
> doesnt define that feature.
> JCas Type "org.apache.uima.conceptMapper.support.tokenizer.TokenAnnotation" 
> implements getters and setters for feature "tokenClass", but the type system 
> doesnt define that feature.
>
> 08:09:20.672 - 16: org.apache.uima.jcas.impl.JCasImpl.reportInitErrors(809): 
> WARNING:
> JCas Type "org.apache.uima.conceptMapper.support.tokenizer.TokenAnnotation" 
> implements getters and setters for feature "tokenType", but the type system 
> doesnt define that feature.
> JCas Type "org.apache.uima.conceptMapper.support.tokenizer.TokenAnnotation" 
> implements getters and setters for feature "tokenClass", but the type system 
> doesnt define that feature.
>
> 08:09:20.682 - 16: org.apache.uima.conceptMapper.Logger.log(46): INFO: 
> ConceptMapper INFO: Finished loading 4 entries
> 08:09:20.682 - 16: org.apache.uima.conceptMapper.Logger.log(46): INFO: 
> ConceptMapper INFO: ...done loading dictionary from 
> file:/C:/Users/Chinyere/eclipse_workspace_2018/NYUW_PathReader/resources/PathologyBiomakers.xml
> 08:09:27.65 - 16: 
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(434):
>  SEVERE: Exception occurred
> org.apache.uima.analysis_engine.AnalysisEngineProcessException
>                 at 
> org.apache.uima.conceptMapper.ConceptMapper.process(ConceptMapper.java:574)
>                 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:401)
>                 at 
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:318)
>                 at 
> org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
>                 at 
> org.apache.uima.tools.cvd.MainFrame.internalRunAE(MainFrame.java:1528)
>                 at 
> org.apache.uima.tools.cvd.MainFrame.runAE(MainFrame.java:430)
>                 at 
> org.apache.uima.tools.cvd.control.AnnotatorRerunEventHandler.actionPerformed(AnnotatorRerunEventHandler.java:40)
>                 at javax.swing.AbstractButton.fireActionPerformed(Unknown 
> Source)
>                 at javax.swing.AbstractButton$Handler.actionPerformed(Unknown 
> Source)
>                 at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown 
> Source)
>                 at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
>                 at javax.swing.AbstractButton.doClick(Unknown Source)
>                 at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown 
> Source)
>                 at 
> javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
>                 at java.awt.Component.processMouseEvent(Unknown Source)
>                 at javax.swing.JComponent.processMouseEvent(Unknown Source)
>                 at java.awt.Component.processEvent(Unknown Source)
>                 at java.awt.Container.processEvent(Unknown Source)
>                 at java.awt.Component.dispatchEventImpl(Unknown Source)
>                 at java.awt.Container.dispatchEventImpl(Unknown Source)
>                 at java.awt.Component.dispatchEvent(Unknown Source)
>                 at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown 
> Source)
>                 at java.awt.LightweightDispatcher.processMouseEvent(Unknown 
> Source)
>                 at java.awt.LightweightDispatcher.dispatchEvent(Unknown 
> Source)
>                 at java.awt.Container.dispatchEventImpl(Unknown Source)
>                 at java.awt.Window.dispatchEventImpl(Unknown Source)
>                 at java.awt.Component.dispatchEvent(Unknown Source)
>                 at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
>                 at java.awt.EventQueue.access$500(Unknown Source)
>                 at java.awt.EventQueue$3.run(Unknown Source)
>                 at java.awt.EventQueue$3.run(Unknown Source)
>                 at java.security.AccessController.doPrivileged(Native Method)
>                 at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>  Source)
>                 at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>  Source)
>                 at java.awt.EventQueue$4.run(Unknown Source)
>                 at java.awt.EventQueue$4.run(Unknown Source)
>                 at java.security.AccessController.doPrivileged(Native Method)
>                 at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>  Source)
>                 at java.awt.EventQueue.dispatchEvent(Unknown Source)
>                 at 
> java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>                 at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown 
> Source)
>                 at 
> java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>                 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>                 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>                 at java.awt.EventDispatchThread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
>                 at 
> org.apache.uima.cas.impl.TypeSystemImpl.ll_getCodeForTypeName(TypeSystemImpl.java:1407)
>                 at 
> org.apache.uima.cas.impl.TypeSystemImpl.getType(TypeSystemImpl.java:612)
>                 at 
> org.apache.uima.conceptMapper.ConceptMapper.typeSystemInit(ConceptMapper.java:418)
>                 at 
> org.apache.uima.conceptMapper.ConceptMapper.process(ConceptMapper.java:503)
>                 ... 45 more
>
> 08:09:27.67 - 16: org.apache.uima.tools.cvd.MainFrame.handleException(527): 
> SEVERE: Exception occurred
> org.apache.uima.analysis_engine.AnalysisEngineProcessException
>                 at 
> org.apache.uima.conceptMapper.ConceptMapper.process(ConceptMapper.java:574)
>                 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:401)
>                 at 
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:318)
>                 at 
> org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
>                 at 
> org.apache.uima.tools.cvd.MainFrame.internalRunAE(MainFrame.java:1528)
>                 at 
> org.apache.uima.tools.cvd.MainFrame.runAE(MainFrame.java:430)
>                 at 
> org.apache.uima.tools.cvd.control.AnnotatorRerunEventHandler.actionPerformed(AnnotatorRerunEventHandler.java:40)
>                 at javax.swing.AbstractButton.fireActionPerformed(Unknown 
> Source)
>                 at javax.swing.AbstractButton$Handler.actionPerformed(Unknown 
> Source)
>                 at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown 
> Source)
>                 at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
>                 at javax.swing.AbstractButton.doClick(Unknown Source)
>                 at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown 
> Source)
>                 at 
> javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
>                 at java.awt.Component.processMouseEvent(Unknown Source)
>                 at javax.swing.JComponent.processMouseEvent(Unknown Source)
>                 at java.awt.Component.processEvent(Unknown Source)
>                 at java.awt.Container.processEvent(Unknown Source)
>                 at java.awt.Component.dispatchEventImpl(Unknown Source)
>                 at java.awt.Container.dispatchEventImpl(Unknown Source)
>                 at java.awt.Component.dispatchEvent(Unknown Source)
>                 at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown 
> Source)
>                 at java.awt.LightweightDispatcher.processMouseEvent(Unknown 
> Source)
>                 at java.awt.LightweightDispatcher.dispatchEvent(Unknown 
> Source)
>                 at java.awt.Container.dispatchEventImpl(Unknown Source)
>                 at java.awt.Window.dispatchEventImpl(Unknown Source)
>                 at java.awt.Component.dispatchEvent(Unknown Source)
>                 at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
>                 at java.awt.EventQueue.access$500(Unknown Source)
>                 at java.awt.EventQueue$3.run(Unknown Source)
>                 at java.awt.EventQueue$3.run(Unknown Source)
>                 at java.security.AccessController.doPrivileged(Native Method)
>                 at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>  Source)
>                 at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>  Source)
>                 at java.awt.EventQueue$4.run(Unknown Source)
>                 at java.awt.EventQueue$4.run(Unknown Source)
>                 at java.security.AccessController.doPrivileged(Native Method)
>                 at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>  Source)
>                 at java.awt.EventQueue.dispatchEvent(Unknown Source)
>                 at 
> java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>                 at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown 
> Source)
>                 at 
> java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>                 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>                 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>                 at java.awt.EventDispatchThread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
>                 at 
> org.apache.uima.cas.impl.TypeSystemImpl.ll_getCodeForTypeName(TypeSystemImpl.java:1407)
>                 at 
> org.apache.uima.cas.impl.TypeSystemImpl.getType(TypeSystemImpl.java:612)
>                 at 
> org.apache.uima.conceptMapper.ConceptMapper.typeSystemInit(ConceptMapper.java:418)
>                 at 
> org.apache.uima.conceptMapper.ConceptMapper.process(ConceptMapper.java:503)
>                 ... 45 more
>
>

Reply via email to