I should also note that, when running the PEAR with the external resource (question 1) in the CAS visual debugger, I have no errors and it runs perfectly fine. I am using UIMA AS 2.4.1, compiled from the source about 1 month ago. Thanks in advance for your time.
________________________________ From: GATE User <[email protected]> To: "[email protected]" <[email protected]> Sent: Wednesday, May 29, 2013 4:20 PM Subject: UIMA AS PEAR External Resource and Type System Decriptor problem? Thanks in advance for your time and help. 1) I'm trying to use an external resource in a UIMA AS PEAR. During the PEAR's installation using the runPearInstaller.sh, it seems to find the file just fine. However, when I deploy the PEAR, the resource is not created. When I print out the the absolute file path, I get null. Here is the external resources part of my descriptor: <externalResourceDependencies> <externalResourceDependency> <key>ValidIds</key> <description /> <interfaceName>uima.resources.implementations.StringMapResource_Impl</interfaceName> <optional>false</optional> </externalResourceDependency> </externalResourceDependencies> <resourceManagerConfiguration> <externalResources> <externalResource> <name>ValidIdsFile</name> <description /> <fileResourceSpecifier> <fileUrl>file:uima/resources/file/validIds</fileUrl> </fileResourceSpecifier> <implementationName>uima.resources.implementations.StringMapResource_Impl</implementationName> </externalResource> </externalResources> <externalResourceBindings> <externalResourceBinding> <key>ValidIds</key> <resourceName>ValidIdsFile</resourceName> </externalResourceBinding> </externalResourceBindings> </resourceManagerConfiguration> The I am using a typical spring project layout, so the resources go in src/main/resources. When compiled, anything in the resources file is copied to the bin directory. Relative src/main/resources, the file is at: uima/resources/file/validIds I've checked the PEAR and the resource is at the expected location: bin/uima/resources/file/validIds Additionally, after installation, the PATH environment variable is set to the bin directory in the setenv file under metadata. In the annotator, in the initialize() method, I am getting the annotator like so: public static final String exResourceGridZoes = "ValidIds"; map = (StringMapResource) aContext.getConfigParameterValue(exResourceGridZoes); if(map == null) { try { getContext().getLogger().log(Level.INFO, "RegularExpressionAnnotator: resource" + " file not found." + getContext().getResourceFilePath(exResourceGridZoes)); } catch (ResourceAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } } The getContext().getResourceFilePath(exResourceGridZoes)) is returning a null, and I'm not sure why. Only thing I can think of is that it can't find the resource "ValidIds", but I don't know why. 2) What's the best way to share TypeSystemDescriptor files. Right now, I'm just copying them into any annotators that need them. Is there a way to have the analysisEngineDescriptor read them from a jar?
