The error message comes from the PEAR "validator" which attempts to use the
classpath specified within the PEAR to locate the Annotator's Java Class and
load it.

Some things to check:

Look at the installed PEAR's directory, and see if you see the Jar that contains
the Annotator's classfile (named test.SpanAnnotator ).  Also verify that the
PEAR's class path is set up properly.

When you generated the PEAR, you had to supply a main xml descriptor - check
that you did that correctly.

HTH.  -Marshall

On 5/2/2011 1:36 PM, Anuj Kumar wrote:
> Hi All,
>
> I have created an aggregate analysis engine that combines more than one
> primitive engines. The aggregate engine works fine if I load it using the
> Visual Debugger but, if I generate a PEAR file out of it and try to install
> that PEAR file, it gives ResourceInitializationException using the PEAR
> installer. The stack trace is-
>
> Verification of TestAggregateAnnotator  failed =>
>  org.apache.uima.resource.ResourceInitializationException: The class
> test.SpanAnnotator is not a valid Analysis Component.  You must specify an
> Annotator, CAS Consumer, Collection Reader, or CAS Multiplier. If you are
> calling ResourceManager.setExtensionClassPath, this error can also be caused
> if you have put UIMA framework jar files on the extension classpath, which
> is not allowed. (Descriptor:
> file:/C:/OpenSourceContributions/TestAggregateAnnotator/desc/SpanAnnotator.xml)
> at
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:214)
> at
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:155)
> at
> org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
> at
> org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
> at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:267)
> at
> org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:361)
> at
> org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:254)
> at
> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:431)
> at
> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375)
> at
> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:185)
> at
> org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
> at
> org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
> at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:267)
> at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:312)
> at
> org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:392)
> at
> org.apache.uima.pear.tools.InstallationTester.testAnalysisEngine(InstallationTester.java:218)
> at
> org.apache.uima.pear.tools.InstallationTester.doTest(InstallationTester.java:113)
> at
> org.apache.uima.pear.tools.InstallationController.verifyComponentInstallation(InstallationController.java:1110)
> at
> org.apache.uima.pear.tools.InstallationController.verifyComponent(InstallationController.java:1993)
> at
> org.apache.uima.tools.pear.install.InstallPear.installPear(InstallPear.java:389)
> at
> org.apache.uima.tools.pear.install.InstallPear.access$000(InstallPear.java:80)
> at
> org.apache.uima.tools.pear.install.InstallPear$RunInstallation.run(InstallPear.java:109)
> at java.lang.Thread.run(Thread.java:619)
>
> I am using eclipse based plugin of UIMA to run the Visual Debugger and to
> generate/install the PEAR file. It works with the Visual Debugger, so I
> guess something is going wrong while generating the PEAR file but I am not
> sure.
>
> What might be the problem?
>
> Please let me know, in case you need more details.
>
> Thanks,
> Anuj
>

Reply via email to