You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Richard Eckart de Castilho (JIRA)" <de...@uima.apache.org> on 2013/07/20 17:10:49 UTC

[jira] [Resolved] (UIMA-3093) Specifying other classes, such as FileResourceSpecifier_impl, as resource specifiers causes IllegalClassException when binding

     [ https://issues.apache.org/jira/browse/UIMA-3093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Eckart de Castilho resolved UIMA-3093.
----------------------------------------------

    Resolution: Fixed
    
> Specifying other classes, such as FileResourceSpecifier_impl, as resource specifiers causes IllegalClassException when binding
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-3093
>                 URL: https://issues.apache.org/jira/browse/UIMA-3093
>             Project: UIMA
>          Issue Type: Bug
>          Components: uimaFIT
>            Reporter: Richard Eckart de Castilho
>            Assignee: Richard Eckart de Castilho
>             Fix For: 2.0.0uimaFIT
>
>
> I'm working with ConceptMapper, which means I need to attach a FileResourceSpecifier to the external dictionary resource (it only took me most of the day to work this out).
> The relevant bits of code are something like this:
> AnalysisEngineDescription aed = AnalysisEngineFactory.createAnalysisEngineDescription(
>     "analysis_engine.descriptor_name");
> ExternalResourceDescription dictRes = 
>     ExternalResourceFactory.createExternalResourceDescription(
>     "DictionaryFileName", DictionaryResource_impl.class, "someURL");
> FileResourceSpecifier frSpec = new FileResourceSpecifier_impl();
> frSpec.setFileUrl("file:testDict.xml");
> dictRes.setResourceSpecifier(frSpec);
> ExternalResourceFactory.bindExternalResource(aed, 
>     ConceptMapper.PARAM_DICT_FILE, dictRes)
> This gets an IllegalClassException:
> org.apache.commons.lang.IllegalClassException: Unsupported resource specifier class [class org.apache.uima.resource.impl.FileResourceSpecifier_impl]
> 	at org.uimafit.factory.ConfigurationParameterFactory.canParameterBeSet(ConfigurationParameterFactory.java:584)
> 	at org.uimafit.factory.ExternalResourceFactory.bindNestedResources(ExternalResourceFactory.java:839)
> I think this is a spurious error; I've wrapper the call to .canParameterBeSet() in a try/catch, and it seems to work fine (I've now got another unrelated downstream problem, so I can't promise yet, but will update when I do know more)
> See also: https://code.google.com/p/uimafit/issues/detail?id=133

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira