On 5/18/07, Kirk True <[EMAIL PROTECTED]> wrote:
Hi Thilo,

> Yes, that's a known issue.  There is one trick you can use: don't use
> InternationalizedException directly, but inherit from it.  Bundle
> this
> exception class with your pear.  Since message localization is done
> in
> the exception class, the correct class loader will then be used and
> your message bundle will be found.  It's a bit of a hack, but it
> works ;-)

Thanks for the fast reply!

Is there a bug report listed somewhere? I looked for it, but didn't
find anything.

Thanks for the workaround. My concern is that since we want to "host"
arbitrary annotators from third parties, etc. *their* annotators won't
implement the trick and thus fail :(


I don't think we have a JIRA for this currently, feel free to open one.

However I don't think there is any simple fix possible here.  I think
we would need to add a new constructor to the
InternationalizedException, either that takes the
ResourceManager/ClassLoader (so the framework has access to the
extension class loader for this annotator), or which takes the
localized string (so that the internationalization can be done in the
annotator rather than by the framework).  In both cases annotator code
would need to change in order to take advantage of this.

-Adam

Reply via email to