You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jerry Cwiklik (JIRA)" <ui...@incubator.apache.org> on 2010/02/01 19:48:20 UTC
[jira] Commented: (UIMA-1731) ResourceInitializationExceptions
thrown by a deployed aggregate are only partially logged
[ https://issues.apache.org/jira/browse/UIMA-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828217#action_12828217 ]
Jerry Cwiklik commented on UIMA-1731:
-------------------------------------
I checked the code and discovered that the problem described here is due to a wrong style of logging. In many places, while logging WARNING messages using these keys:
UIMAEE_exception__WARNING
UIMAJMS_exception__WARNING
the UIMA AS code uses something like this:
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
"takeAction", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
"UIMAEE_exception__WARNING", new Object[] { e });
The above does not log the whole stack trace hiding a real cause. Change code to use this instead:
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
"takeAction", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
"UIMAEE_exception__WARNING", e);
The above is better than just using
log(Level level, String aMessage, Throwable thrown);
since it identifies a method where the failure is detected.
> ResourceInitializationExceptions thrown by a deployed aggregate are only partially logged
> -----------------------------------------------------------------------------------------
>
> Key: UIMA-1731
> URL: https://issues.apache.org/jira/browse/UIMA-1731
> Project: UIMA
> Issue Type: Bug
> Components: Async Scaleout
> Reporter: Burn Lewis
> Priority: Minor
> Fix For: 2.3AS
>
>
> When the XcasCollectionReader fails to init because its input directory is missing it reports the cause when run in core UIMA, i.e.
> Caused by: org.apache.uima.resource.ResourceInitializationException: Initialization of annotator class "com.ibm.nlp.readers.XcasCollectionReader" failed. (Descriptor: file:/.automount/hlthome01/a/hlthome01/homes/hlthome01.3/burn/workspace/factotem/desc/pipe/readers/XcasCollectionReader.xml)
> Caused by: org.apache.uima.resource.ResourceInitializationException: Invalid value for parameter "InputDirectory" in component "null" -- directory "xmidata" does not exist.
> but when deployed under UIMA-AS this detailed exception is missing ... all we get is the higher-level cause, e.g.
> 1/30/10 10:56:15 PM - 3: org.apache.uima.aae.controller.PrimitiveAnalysisEngineController_impl.initializeAnalysisEngine: WARNING: org.apache.uima.resource.ResourceInitializationException: Initialization of annotator class "com.ibm.nlp.readers.XcasCollectionReader" failed. (Descriptor: file:/u/burn/workspace/factotem/desc/pipe/readers/XcasCollectionReader.xml)
> Also, the detailed message lists the component as "null" ... the collection reader follows the example code and reports the error with:
> throw new ResourceInitializationException(
> ResourceConfigurationException.DIRECTORY_NOT_FOUND,
> new Object[] { PARAM_INPUTDIR, this.getMetaData().getName(), directory.getPath() });
> How should we retrieve the component name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.