Hi Kai -
Without diving into this, (so my comments may be off base, if so, please
let me know) - if you go to uima.markmail.org and search using the
keyword "buddy" you'll find a bunch of messages that describe how to set
plugin manifests to use the Eclipse buddy loader mechanism, which often
seems to solve these kinds of problems.
Did you know about this, and did you try it (and if so, did it fix things)?
-Marshall
Kai Schlamp wrote:
> Hello.
>
> I use UIMA analysis engines as Eclipse plugins inside an Eclipse RCP
> application.
> Nearly everything works fine, but I can't get the resource definitions
> to work corretly.
> When trying to fetch the path of the resource in my annotators
> intialize method (by using
> getContext().getResourceFilePath("sd_model");), then I get the below
> exception.
> It must be some classpath problem (as so often with Eclipse plugins)
> as this analysis engine works correctly using the UIMA document analyzer.
>
> Here is how I define the resource in the AE descriptor:
>
> <resourceManagerConfiguration>
> <externalResources>
> <externalResource>
> <name>english_sd_model</name>
> <description/>
> <fileResourceSpecifier>
> <fileUrl>file:EnglishSD.bin.gz</fileUrl>
> </fileResourceSpecifier>
> </externalResource>
> </externalResources>
> <externalResourceBindings>
> <externalResourceBinding>
> <key>sd_model</key>
> <resourceName>english_sd_model</resourceName>
> </externalResourceBinding>
> </externalResourceBindings>
> </resourceManagerConfiguration>
>
> Should I define the fileUrl somehow different?
>
> Regards,
> Kai
>
>
> org.apache.uima.resource.ResourceAccessException
> at
> org.apache.uima.impl.UimaContext_ImplBase.getResourceFilePath(UimaContext_ImplBase.java:226)
>
> at
> org.pubcurator.analyzers.range.annotators.RangeAnnotator.initialize(RangeAnnotator.java:54)
>
> at
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:251)
>
> at
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:157)
>
> 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:335)
>
> at
> org.pubcurator.analyzers.range.annotators.RangeAnnotatorTest.testProcessJCas(RangeAnnotatorTest.java:35)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>
> at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
>
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
>
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>
> at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>
> at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
>
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>
> at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
>
> at
> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
>
>
>