Thanks, Girish - Marshall

Chavan, Girish wrote:
> Fixes are verified. They work without any problems and I don't have to set 
> the session too.
> I have also commented on the successful verification in JIRA
>
> Thanks a ton,
> _______________
> Girish Chavan, MSIS
> Department of Biomedical Informatics (DBMI)
> University of Pittsburgh
>
>
>
> -----Original Message-----
> From: Marshall Schor [mailto:[email protected]] 
> Sent: Wednesday, July 29, 2009 5:12 PM
> To: [email protected]
> Subject: Re: Problem reconfiguring after setting a config parameter value
>
> Thanks for testing :-)
>
> I opened two Jira issues for this (UIMA-1466 and 1467), and have fixed
> both of them. 
> If you can, it would be great if you could verify these fixes, by
> building uimaj-core from sources.
>
> The fix should also get rid of the need in your code to set that
> SessionImpl thing.
>
> -Marshall
>
> Chavan, Girish wrote:
>   
>> Just tested it. It does not fail when using either a primitive or an 
>> aggregate AE. I guess it fails only if it is a PEAR descriptor
>>
>> _______________
>> Girish Chavan, MSIS
>> Department of Biomedical Informatics (DBMI)
>> University of Pittsburgh
>>
>>
>>
>> -----Original Message-----
>> From: Marshall Schor [mailto:[email protected]] 
>> Sent: Tuesday, July 28, 2009 10:20 PM
>> To: [email protected]
>> Subject: Re: Problem reconfiguring after setting a config parameter value
>>
>> Thanks.  This looks like it might be a bug - I'll see if I can make a
>> small test case.  Do you know whether or not it fails if you use a
>> non-PEAR descriptor, say just a simple primitive?
>>
>> -Marshall
>>
>> Chavan, Girish wrote:
>>   
>>     
>>> I have included the more of the stack trace. I am running this within an 
>>> Eclipse RCP application. Only part that is relevant to UIMA is the stuff 
>>> above UIMAUtils.loadAnalysisEngine. UIMAUtils is my class which loads an 
>>> analysis engine given the descriptor file. In my case it is a PEAR 
>>> descriptor. I have included the code in question and the stack trace below.
>>>
>>>
>>> CODE:
>>> public static AnalysisEngine loadAnalysisEngine(File aeDescriptorFile) 
>>> throws IOException, UIMAException {
>>>             XMLInputSource in = new XMLInputSource(aeDescriptorFile);
>>>             ResourceSpecifier specifier = UIMAFramework.getXMLParser()
>>>                             .parseResourceSpecifier(in);
>>>             
>>>             AnalysisEngine ae =  
>>> UIMAFramework.produceAnalysisEngine(specifier);
>>>             ae.getUimaContextAdmin().setSession(new Session_impl());
>>>             try {
>>>                     ae.reconfigure();
>>>             } catch (ResourceConfigurationException e) {
>>>                     e.printStackTrace();
>>>             }
>>>             return ae;
>>> }
>>>
>>>
>>> EXCEPTION (thrown by ae.reconfigure() above):
>>>
>>> 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)
>>>     at 
>>> edu.pitt.dbmi.odie.uima.utils.UIMAUtils.loadAnalysisEngine(UIMAUtils.java:143)
>>>     at 
>>> edu.pitt.dbmi.odie.uima.utils.UIMAUtils.loadAnalysisEngine(UIMAUtils.java:153)
>>>     at 
>>> edu.pitt.dbmi.odie.ui.editors.AnalysisEngineSection.refresh(AnalysisEngineSection.java:135)
>>>     at org.eclipse.ui.forms.ManagedForm.doRefresh(ManagedForm.java:207)
>>>     at org.eclipse.ui.forms.ManagedForm.refresh(ManagedForm.java:192)
>>>     at org.eclipse.ui.forms.editor.FormPage.setActive(FormPage.java:124)
>>>     at 
>>> org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:503)
>>>     at 
>>> org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:973)
>>>     at 
>>> org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:623)
>>>     at 
>>> org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:314)
>>>     at 
>>> org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
>>>     at 
>>> org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428)
>>>     at 
>>> org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
>>>     at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:306)
>>>     at 
>>> org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
>>>     at 
>>> org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
>>>     at 
>>> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
>>>     at 
>>> org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
>>>
>>>
>>> _______________
>>> Girish Chavan, MSIS
>>> Department of Biomedical Informatics (DBMI)
>>> University of Pittsburgh
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Marshall Schor [mailto:[email protected]] 
>>> Sent: Tuesday, July 28, 2009 1:41 PM
>>> To: [email protected]
>>> Subject: Re: Problem reconfiguring after setting a config parameter value
>>>
>>> hi -
>>>
>>> Could you post a bit more of the stack trace for this case?
>>>
>>> Are you running within some kind of web container?
>>>
>>> -Marshall
>>>
>>> Chavan, Girish wrote:
>>>   
>>>     
>>>       
>>>> 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]
>>>>
>>>>
>>>>   
>>>>     
>>>>       
>>>>         
>>>   
>>>     
>>>       
>>   
>>     
>
>
>   

Reply via email to