You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Sergii Poluektov <se...@googlemail.com> on 2015/08/02 14:48:25 UTC
ResourceInitializationException: The class doesn't implement org.apache.uima.resource.SharedResourceObject
Hello Everyone,
i am trying to develop a simple analysis engine component which should make
use of an
external resource.I followed the example 6 from the UIMA tutorials and my
tests run without any
problems: The external resource is loaded, the analysis engine uses the
information stored in
the external resource and produces correct output.
However, after I packed the the component into a PEAR and then tried to
install it, the verification process
throws the ResourceInitializationException, saying that my external
resource implementation class
does not implement the org.apache.uima.resource.SharedResourceObject (even
though it does).
The fragment in the code where the error is thrown is in
org.apache.uima.resource.impl.ResourceManager_impl.java line 607.
During the debugging I could figure out that if the Application ClassLoader
is used (this is the case when
instantiating the component) to load the external resource implementation
class, then there is no error.
However when the UIMA extension ClassLoader is used then the error is
thrown(this is the case when
verifying the component).
I also checked that all the needed jars are included and that the class
path is correct.
Thanks in advance for your help.
Cheers,
Sergii
Re: ResourceInitializationException: The class doesn't implement
org.apache.uima.resource.SharedResourceObject
Posted by Marshall Schor <ms...@schor.com>.
There's an easy fix (maybe!).
The PEAR's classpath cannot contain the UIMA framework classes; I'm guessing
that it does.
So - just remove uima-core (?) from the set of Jars in the PEAR's classpath, and
this will fix it.
Let me know if this works!
-Marshall
On 8/2/2015 8:48 AM, Sergii Poluektov wrote:
> Hello Everyone,
>
> i am trying to develop a simple analysis engine component which should make
> use of an
> external resource.I followed the example 6 from the UIMA tutorials and my
> tests run without any
> problems: The external resource is loaded, the analysis engine uses the
> information stored in
> the external resource and produces correct output.
>
> However, after I packed the the component into a PEAR and then tried to
> install it, the verification process
> throws the ResourceInitializationException, saying that my external
> resource implementation class
> does not implement the org.apache.uima.resource.SharedResourceObject (even
> though it does).
>
> The fragment in the code where the error is thrown is in
> org.apache.uima.resource.impl.ResourceManager_impl.java line 607.
> During the debugging I could figure out that if the Application ClassLoader
> is used (this is the case when
> instantiating the component) to load the external resource implementation
> class, then there is no error.
> However when the UIMA extension ClassLoader is used then the error is
> thrown(this is the case when
> verifying the component).
>
> I also checked that all the needed jars are included and that the class
> path is correct.
>
> Thanks in advance for your help.
>
> Cheers,
> Sergii
>
Re: ResourceInitializationException: The class doesn't implement org.apache.uima.resource.SharedResourceObject
Posted by Richard Eckart de Castilho <re...@apache.org>.
Hi Sergii,
no solution but at least a pointer: looks like an issue was open recently that
is related to your question:
https://issues.apache.org/jira/browse/UIMA-4499
Cheers,
-- Richard
On 02.08.2015, at 14:48, Sergii Poluektov <se...@googlemail.com> wrote:
> Hello Everyone,
>
> i am trying to develop a simple analysis engine component which should make
> use of an
> external resource.I followed the example 6 from the UIMA tutorials and my
> tests run without any
> problems: The external resource is loaded, the analysis engine uses the
> information stored in
> the external resource and produces correct output.
>
> However, after I packed the the component into a PEAR and then tried to
> install it, the verification process
> throws the ResourceInitializationException, saying that my external
> resource implementation class
> does not implement the org.apache.uima.resource.SharedResourceObject (even
> though it does).
>
> The fragment in the code where the error is thrown is in
> org.apache.uima.resource.impl.ResourceManager_impl.java line 607.
> During the debugging I could figure out that if the Application ClassLoader
> is used (this is the case when
> instantiating the component) to load the external resource implementation
> class, then there is no error.
> However when the UIMA extension ClassLoader is used then the error is
> thrown(this is the case when
> verifying the component).
>
> I also checked that all the needed jars are included and that the class
> path is correct.
>
> Thanks in advance for your help.
>
> Cheers,
> Sergii