You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Aaron Kaplan (JIRA)" <ui...@incubator.apache.org> on 2008/07/09 13:51:31 UTC
[jira] Created: (UIMA-1107) Sofa mapping not applied when annotator
loaded from PEAR
Sofa mapping not applied when annotator loaded from PEAR
--------------------------------------------------------
Key: UIMA-1107
URL: https://issues.apache.org/jira/browse/UIMA-1107
Project: UIMA
Issue Type: Bug
Components: Core Java Framework
Affects Versions: 2.2.2
Reporter: Aaron Kaplan
I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (UIMA-1107) Sofa mapping not applied when
annotator loaded from PEAR
Posted by "Aaron Kaplan (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aaron Kaplan reopened UIMA-1107:
--------------------------------
I just tested this fix for the first time, and it doesn't resolve the problem. The symptoms are exactly as before.
> Sofa mapping not applied when annotator loaded from PEAR
> --------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-1107) Annotator context not set when
annotator loaded from PEAR
Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649803#action_12649803 ]
Marshall Schor commented on UIMA-1107:
--------------------------------------
To add the new newDefaultResourceManagerPearWrapper to the UIMAFramework, I plan to do the following:
# add the newDefaultResourceManagerPearWrapper method to UIMAFramework (static method). This method will call the _newDefaultResourceManager() method on the "impl" of the UIMAFramework.
# Add the _newDefaultResourceManagerPearWrapper() to UIMAFramework_impl. This loads using Class.forName a class which is obtained by parsing the factory.config file.
# Add to the SAX parse for the factory config file, a stanza for getting the value of a new XML element, named "resourceManagerPearWrapper", for use by the above.
# Add an element "resourceManagerPearWrapper" to the factory.config xml, specifying the name of the new ResourceManagerPearWrapper class.
Did I forget anything, or is this OK?
Also, I did create a test case, and verified that the fix does work, as far as passing in the sofa mappings correctly. I'll be adding the test case to the regression bucket. If anyone is motivated, they can add a test to see if configuration parameters work (they should, now) going from outside the pear to inside.
> Annotator context not set when annotator loaded from PEAR
> ---------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-1107) Sofa mapping not applied when
annotator loaded from PEAR
Posted by "Aaron Kaplan (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614707#action_12614707 ]
Aaron Kaplan commented on UIMA-1107:
------------------------------------
Oh right, now I see that there's an entry listed under Subversion Commits. Thanks for the clarification (and for the fix).
> Sofa mapping not applied when annotator loaded from PEAR
> --------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Eddie Epstein
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-1107) Annotator context not set when
annotator loaded from PEAR
Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648317#action_12648317 ]
Marshall Schor commented on UIMA-1107:
--------------------------------------
h2.Summary of the chronology of this issue and the related issue UIMA-1150
# First bug reported: Sofa mappings not being passed to Pear-wrapped annotators
# Fix: change the pear wrapper initialize() method, where it creates the inner analysis engine, to include the aAdditionalParams, which has the sofa mappings in the UIMA_CONTEXT, when calling the produceAnalysisEngineMethod (see svn link above).
# This broke some unit tests, reported in UIMA-1150. This was because the wrapped analysis engine got its resource manager from the passed-in UIMA_CONTEXT, ignoring the passed-in Resource Manager.
# The fix for this was to exclude the UIMA_CONTEXT from the aAdditionalParams. This, now, broke the sofa mappings.
There are two (maybe more) alternatives for fixing this, going forward.
# Change the mechanism for obtaining the ResourceManager, to allow it to be overridden in child instances of the UIMA_CONTEXT.
# Build a new UIMA_CONTEXT and pass it in. This would have the new ResourceManager, plus *selected* values from the current UIMA_CONTEXT.
In any case, from a user point of view, are there any values (besides the Classpath, Datapath) that should be kept isolated from the wrapped Pear annotator? The candidates to consider are:
* The configuration parameters
* The logger / instrumentation facilities
* Access to external resources (that are explicitly declared in externalResourceDependencies)
* Access to Session information
* Sofa maps (this is what's missing directly in this Jira - so this would not be kept isolated)
* CAS Pools for CAS multipliers
Which of these from the surrounding UIMA_CONTEXT should-or-could be made available to the PEAR (besides the sofa maps)?
Which of these won't work if made available to the PEAR?
Are the sofa mappings passed in as part of the UIMA_CONTEXT or as separate "additionalParameters" items, or both?
Thanks in advance for knowledgeable opinions :-)
> Annotator context not set when annotator loaded from PEAR
> ---------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (UIMA-1107) Annotator context not set when annotator
loaded from PEAR
Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marshall Schor closed UIMA-1107.
--------------------------------
Resolution: Fixed
Fixed typo in Jira comment, too.
> Annotator context not set when annotator loaded from PEAR
> ---------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (UIMA-1107) Sofa mapping not applied when
annotator loaded from PEAR
Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thilo Goetz reopened UIMA-1107:
-------------------------------
After the fix, two pear test cases in core no longer work. Not sure if the fix is insufficient or just exposes a bug somewhere else, but see analysis by Marshall here: http://www.mail-archive.com/uima-dev%40incubator.apache.org/msg07937.html
> Sofa mapping not applied when annotator loaded from PEAR
> --------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Eddie Epstein
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (UIMA-1107) Sofa mapping not applied when
annotator loaded from PEAR
Posted by "Eddie Epstein (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eddie Epstein reassigned UIMA-1107:
-----------------------------------
Assignee: Eddie Epstein
> Sofa mapping not applied when annotator loaded from PEAR
> --------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Eddie Epstein
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (UIMA-1107) Sofa mapping not applied when
annotator loaded from PEAR
Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marshall Schor reassigned UIMA-1107:
------------------------------------
Assignee: Marshall Schor (was: Eddie Epstein)
> Sofa mapping not applied when annotator loaded from PEAR
> --------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (UIMA-1107) Sofa mapping not applied when annotator
loaded from PEAR
Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marshall Schor closed UIMA-1107.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.3
This is fixed by UIMA-1150.
> Sofa mapping not applied when annotator loaded from PEAR
> --------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-1107) Annotator context not set when
annotator loaded from PEAR
Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649744#action_12649744 ]
Marshall Schor commented on UIMA-1107:
--------------------------------------
I initially made it an independent class which delegates. However, that didn't work for things where I would delegate up to the parent, which would then, in turn, want to get something via a classpath/datapath. For instance, I think the method registerResource makes an "initParams" map which contains a reference to the relativePathResolver, which, in turn, needs to use the Pears' classpath/datapath (at least in the current design).
resolveAndValidateResourceDependencies also uses the relativePathResolver. And there are some others...
So, I would need to have copies of these methods in the new class. Using subclassing avoids this; the new class is very small and shares more with its parent.
> Annotator context not set when annotator loaded from PEAR
> ---------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-1107) Sofa mapping not applied when
annotator loaded from PEAR
Posted by "Aaron Kaplan (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614695#action_12614695 ]
Aaron Kaplan commented on UIMA-1107:
------------------------------------
I'm not sure I understand your answer. The only place I find something called aAdditionalParams is in Resource.initialize(), which the javadoc says applications shouldn't call. After some digging, I think you're suggesting that I specify the sofa mappings as in Section 6.4.4 of UIMA Tutoral and Developers' Guides. Is that right? But I wasn't creating my aggregate programmatically--I simply defined it in an annotator descriptor, which I referenced in a CPE descriptor, which I instantiated using the cpeGui. Is it impossible to specify a sofa mapping that way?
And a meta-issue: you marked this bug "Fixed" but it doesn't sound like you changed anything. Did you mean "Invalid" or "Won't Fix?"
> Sofa mapping not applied when annotator loaded from PEAR
> --------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Eddie Epstein
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-1107) Annotator context not set when
annotator loaded from PEAR
Posted by "Adam Lally (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649806#action_12649806 ]
Adam Lally commented on UIMA-1107:
----------------------------------
Yes, that sounds right. (Except in #1 you have a typo - it should say "This method will call the _newDefaultResourceManagerPearWrapper()")
> Annotator context not set when annotator loaded from PEAR
> ---------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (UIMA-1107) Sofa mapping not applied when
annotator loaded from PEAR
Posted by "Eddie Epstein (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eddie Epstein resolved UIMA-1107.
---------------------------------
Resolution: Fixed
When creating the analysis engine from the pear specifier, aAdditionalParams must be used in order to propagate sofa mappings.
> Sofa mapping not applied when annotator loaded from PEAR
> --------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Eddie Epstein
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-1107) Annotator context not set when
annotator loaded from PEAR
Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649727#action_12649727 ]
Marshall Schor commented on UIMA-1107:
--------------------------------------
I've done some experiments taking the approach (1, prev comment), where I modified the UIMA_Context to allow it to hold overriding version of the Resource Manager. Unfortunately, the ResourceManager holds a lot of other things, which need to be held just once, at the top level. An example of this is the type system that is built up from all the component metadata.
To solve this problem, I created subclass of ResourceManager_impl, which has private fields representing the overridden classpath/data path parts, and shares all the other fields with its parent; this seems to work.
ResourceManager_impl is one of the classes created using the UIMAFramework factory mechanism, meaning that the class name for this class can be overridden. The mechanism for this solution, however, now depends on the particular implementation of this class.
How important is it to preserve the flexibility to substitute different implementations of ResourceManager into UIMA using the UIMAFramework.newDefaultResourceManager()? If this is important, I could add a new method here, UIMAFramework.newDefaultResourceManagerPearWrapper() ....
My opinion is that I think nobody is using the UIMA Factory capability to substitute certain parts of UIMA with other classes (Please speak up if that's not true!).
> Annotator context not set when annotator loaded from PEAR
> ---------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-1107) Annotator context not set when
annotator loaded from PEAR
Posted by "Adam Lally (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649770#action_12649770 ]
Adam Lally commented on UIMA-1107:
----------------------------------
Okay, I see. I've looked over the code and I don't see any better way of doing this.
I would like to keep the ability to have the ResourceManager implementation be parameterizable. The idea here was that if UIMA is embedded inside another framework that has its own way of managing resources (for example, an J2EE application server, where resources are registered in an accessed from JNDI), the ResourceManager implementation could be substituted with one that passes through to the container's implementation.
After considering everything I think the best approach is probably to add a new UIMAFramework.newDefaultResourceManagerPearWrapper() as you suggested.
> Annotator context not set when annotator loaded from PEAR
> ---------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (UIMA-1107) Annotator context not set when
annotator loaded from PEAR
Posted by "Eddie Epstein (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eddie Epstein updated UIMA-1107:
--------------------------------
Summary: Annotator context not set when annotator loaded from PEAR (was: Sofa mapping not applied when annotator loaded from PEAR)
Normally annotators within an aggregate share a resource manager, but annotators running in the Pear wrapper must have their own resource manager. When instantiating an annotator, the resource manager is passed in with the UIMA context object which also contains Sofa mappings and configuration parameter overrides. A redesign is needed for passing all necessary information at annotator instantiation.
> Annotator context not set when annotator loaded from PEAR
> ---------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-1107) Annotator context not set when
annotator loaded from PEAR
Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740247#action_12740247 ]
Marshall Schor commented on UIMA-1107:
--------------------------------------
One SVN change log is missing from this JIRA because the SVN commit message had a typo in the JIRA number. It is misfiled under Jira UIMA-1170 and you can see it there if you need to find it.
> Annotator context not set when annotator loaded from PEAR
> ---------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-1107) Sofa mapping not applied when
annotator loaded from PEAR
Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614706#action_12614706 ]
Thilo Goetz commented on UIMA-1107:
-----------------------------------
I think this is a misunderstanding. This is a valid issue, Eddie *did* fix it and his comment wasn't addressed at you, it was a comment on what the fix consisted in. So expect this to work in the next UIMA release.
> Sofa mapping not applied when annotator loaded from PEAR
> --------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Eddie Epstein
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (UIMA-1107) Annotator context not set
when annotator loaded from PEAR
Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649803#action_12649803 ]
schor edited comment on UIMA-1107 at 11/21/08 2:18 PM:
----------------------------------------------------------------
To add the new newDefaultResourceManagerPearWrapper to the UIMAFramework, I plan to do the following:
# add the newDefaultResourceManagerPearWrapper method to UIMAFramework (static method). This method will call the _newDefaultResourceManagerPearWrapper() method on the "impl" of the UIMAFramework.
# Add the _newDefaultResourceManagerPearWrapper() to UIMAFramework_impl. This loads using Class.forName a class which is obtained by parsing the factory.config file.
# Add to the SAX parse for the factory config file, a stanza for getting the value of a new XML element, named "resourceManagerPearWrapper", for use by the above.
# Add an element "resourceManagerPearWrapper" to the factory.config xml, specifying the name of the new ResourceManagerPearWrapper class.
Did I forget anything, or is this OK?
Also, I did create a test case, and verified that the fix does work, as far as passing in the sofa mappings correctly. I'll be adding the test case to the regression bucket. If anyone is motivated, they can add a test to see if configuration parameters work (they should, now) going from outside the pear to inside.
was (Author: schor):
To add the new newDefaultResourceManagerPearWrapper to the UIMAFramework, I plan to do the following:
# add the newDefaultResourceManagerPearWrapper method to UIMAFramework (static method). This method will call the _newDefaultResourceManager() method on the "impl" of the UIMAFramework.
# Add the _newDefaultResourceManagerPearWrapper() to UIMAFramework_impl. This loads using Class.forName a class which is obtained by parsing the factory.config file.
# Add to the SAX parse for the factory config file, a stanza for getting the value of a new XML element, named "resourceManagerPearWrapper", for use by the above.
# Add an element "resourceManagerPearWrapper" to the factory.config xml, specifying the name of the new ResourceManagerPearWrapper class.
Did I forget anything, or is this OK?
Also, I did create a test case, and verified that the fix does work, as far as passing in the sofa mappings correctly. I'll be adding the test case to the regression bucket. If anyone is motivated, they can add a test to see if configuration parameters work (they should, now) going from outside the pear to inside.
> Annotator context not set when annotator loaded from PEAR
> ---------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-1107) Annotator context not set when
annotator loaded from PEAR
Posted by "Adam Lally (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649742#action_12649742 ]
Adam Lally commented on UIMA-1107:
----------------------------------
Does your new class need to be a subclass of ResourceManager_impl, or is it possible to instead create a PearWrapperResourceManager_impl that implements the ResourceManager interface and delegates all of the methods except for the classpath/datapath to the parent ResourceManager instance? Then it should still work if someone substitutes a different ResourceManager implementation for the parent resource manager.
> Annotator context not set when annotator loaded from PEAR
> ---------------------------------------------------------
>
> Key: UIMA-1107
> URL: https://issues.apache.org/jira/browse/UIMA-1107
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.2.2
> Reporter: Aaron Kaplan
> Assignee: Marshall Schor
> Fix For: 2.3
>
>
> I have an aggregate annotator consisting of an annotator A1 that creates a new sofa, and an annotator A2 that annotates the new sofa. A2 is not sofa-aware, so in the aggregate descriptor I have defined a sofa mapping.
> In the delegateAnalysisEngine element of the aggregate descriptor, if I point to A2's component descriptor (A2/desc/A2.xml), the sofa mapping works: A2 processes the new sofa created by A1. If I point instead to A2's pear installation descriptor (A2/A2_pear.xml), the sofa mapping seems not to be applied: A2 processes the initial sofa instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.