You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Larry Cousin <ld...@mmm.com> on 2016/04/25 22:31:42 UTC
CPE GUI Jar issue
Hi,
I have a pipeline that has a casProcessor descriptor in a jar file that gives me an error when I try to run it in the Eclipse CPE GUI.
The pipeline casProcessor has the following form:
<casProcessor deployment="integrated" name="annotateThis">
<descriptor>
<import name="com.a.b.c.aggregate.AProcessorAggregate"/>
</descriptor>
...
</casProcessor>
I get the following type error when the pipeline is loaded (the aggregate definition file is in a Maven jar):
Could not load descriptor from URL
jar:file:/C:/Users/me/.m2/repository/com/a/b/c/1.2.3/Ajar-1.2.3.jar!/com/a/b/c/aggregate/AProcessorAggregate.xml
CPR Configuator only supports file: URLs
So the system correctly translated "com.a.b.c.aggregate.AProcessorAggregate" into
jar:file:/C:/Users/me/.m2/repository/com/a/b/c/1.2.3/Ajar-1.2.3.jar!/com/a/b/c/aggregate/AProcessorAggregate.xml
and com/a/b/c/aggregate/APRocessorAggregate.xml is in the Jar /C:/Users/me/.m2/repository/com/a/b/c/1.2.3/Ajar-1.2.3.jar
but CPE GUI can't seem to use it.
Is there a way to reference this Jar aggregate xml definition file in a pipeline so Eclipse CPE GUI will not error out?
Thanks!
Re: CPE GUI Jar issue
Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
Forgot to add a link to documentation where import by location is described:
https://uima.apache.org/d/uimaj-current/references.html#ugr.ref.xml.component_descriptor.imports
Jerry
On Tue, Apr 26, 2016 at 9:03 AM, Jaroslaw Cwiklik <ui...@gmail.com> wrote:
> Not familiar with this code but it appears that the CPE GUI only supports
> import by location:
>
> CpmPanel.java
>
> private boolean addAE(CpeCasProcessor cpeCasProc) throws
> CpeDescriptorException,
> InvalidXMLException, IOException, ResourceConfigurationException
> {
> URL aeSpecifierUrl =
> cpeCasProc.getCpeComponentDescriptor().findAbsoluteUrl(defaultResourceManager);
> //CPE GUI only supports file URLs
>
>
> if (!"file".equals(aeSpecifierUrl.getProtocol())) {
> displayError("Could not load descriptor from URL " +
> aeSpecifierUrl.toString() +
> ". CPE Configurator only supports file: URLs");
> return false;
> }
>
>
>
> On Mon, Apr 25, 2016 at 4:31 PM, Larry Cousin <ld...@mmm.com> wrote:
>
>> Hi,
>>
>> I have a pipeline that has a casProcessor descriptor in a jar file that
>> gives me an error when I try to run it in the Eclipse CPE GUI.
>> The pipeline casProcessor has the following form:
>>
>> <casProcessor deployment="integrated" name="annotateThis">
>> <descriptor>
>> <import name="com.a.b.c.aggregate.AProcessorAggregate"/>
>> </descriptor>
>> ...
>> </casProcessor>
>>
>> I get the following type error when the pipeline is loaded (the aggregate
>> definition file is in a Maven jar):
>>
>> Could not load descriptor from URL
>>
>> jar:file:/C:/Users/me/.m2/repository/com/a/b/c/1.2.3/Ajar-1.2.3.jar!/com/a/b/c/aggregate/AProcessorAggregate.xml
>> CPR Configuator only supports file: URLs
>>
>> So the system correctly translated
>> "com.a.b.c.aggregate.AProcessorAggregate" into
>>
>> jar:file:/C:/Users/me/.m2/repository/com/a/b/c/1.2.3/Ajar-1.2.3.jar!/com/a/b/c/aggregate/AProcessorAggregate.xml
>> and com/a/b/c/aggregate/APRocessorAggregate.xml is in the Jar
>> /C:/Users/me/.m2/repository/com/a/b/c/1.2.3/Ajar-1.2.3.jar
>> but CPE GUI can't seem to use it.
>>
>> Is there a way to reference this Jar aggregate xml definition file in a
>> pipeline so Eclipse CPE GUI will not error out?
>>
>> Thanks!
>>
>>
>
Re: CPE GUI Jar issue
Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
Not familiar with this code but it appears that the CPE GUI only supports
import by location:
CpmPanel.java
private boolean addAE(CpeCasProcessor cpeCasProc) throws
CpeDescriptorException,
InvalidXMLException, IOException, ResourceConfigurationException {
URL aeSpecifierUrl =
cpeCasProc.getCpeComponentDescriptor().findAbsoluteUrl(defaultResourceManager);
//CPE GUI only supports file URLs
if (!"file".equals(aeSpecifierUrl.getProtocol())) {
displayError("Could not load descriptor from URL " +
aeSpecifierUrl.toString() +
". CPE Configurator only supports file: URLs");
return false;
}
On Mon, Apr 25, 2016 at 4:31 PM, Larry Cousin <ld...@mmm.com> wrote:
> Hi,
>
> I have a pipeline that has a casProcessor descriptor in a jar file that
> gives me an error when I try to run it in the Eclipse CPE GUI.
> The pipeline casProcessor has the following form:
>
> <casProcessor deployment="integrated" name="annotateThis">
> <descriptor>
> <import name="com.a.b.c.aggregate.AProcessorAggregate"/>
> </descriptor>
> ...
> </casProcessor>
>
> I get the following type error when the pipeline is loaded (the aggregate
> definition file is in a Maven jar):
>
> Could not load descriptor from URL
>
> jar:file:/C:/Users/me/.m2/repository/com/a/b/c/1.2.3/Ajar-1.2.3.jar!/com/a/b/c/aggregate/AProcessorAggregate.xml
> CPR Configuator only supports file: URLs
>
> So the system correctly translated
> "com.a.b.c.aggregate.AProcessorAggregate" into
>
> jar:file:/C:/Users/me/.m2/repository/com/a/b/c/1.2.3/Ajar-1.2.3.jar!/com/a/b/c/aggregate/AProcessorAggregate.xml
> and com/a/b/c/aggregate/APRocessorAggregate.xml is in the Jar
> /C:/Users/me/.m2/repository/com/a/b/c/1.2.3/Ajar-1.2.3.jar
> but CPE GUI can't seem to use it.
>
> Is there a way to reference this Jar aggregate xml definition file in a
> pipeline so Eclipse CPE GUI will not error out?
>
> Thanks!
>
>