Hi All,
I am using the following code to set the value for the 'ChunkCreaterClass'
parameter. I had to add line (2) because without it I was getting a
UIMA_IllegalStateException due to the session being null. I am not quite sure
if that is the way you set a new session. In any case I stopped getting that
error. But now I get a nullpointerexception error ( trace shown below the code).
I had a breakpoint set in the
ConfigurationManagerImplBase.validateConfigurationParameterSettings method to
see what was happening. It entered the method multiple times to validate each
AEs params. The first set of calls was triggered after line (1). And it went
through smoothly. The next set was triggered after line (4) which threw an
exception immediately for the "/" context. Within the implementation of the
validateConfigurationParameterSettings method. I see that
ConfigurationParameterDeclarations comes up null for the "/" context.
Not quite sure what I am doing wrong. Any ideas??
CODE:
(1)AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
(2)ae.getUimaContextAdmin().setSession(new Session_impl());
(3)ae.setConfigParameterValue("ChunkCreaterClass", "Something");
(4)ae.reconfigure();
Exception:
java.lang.NullPointerException
at
org.apache.uima.resource.impl.ConfigurationManagerImplBase.validateConfigurationParameterSettings(ConfigurationManagerImplBase.java:488)
at
org.apache.uima.resource.impl.ConfigurationManagerImplBase.reconfigure(ConfigurationManagerImplBase.java:235)
at
org.apache.uima.resource.ConfigurableResource_ImplBase.reconfigure(ConfigurableResource_ImplBase.java:70)
Thanks.
_______________
Girish Chavan, MSIS
Department of Biomedical Informatics (DBMI)
University of Pittsburgh
UPMC Cancer Pavilion, 302D
5150 Centre Avenue
Pittsburgh, PA 15232
Office: 412-623-4084
Email: [email protected]