You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Adam Wojtuniak (JIRA)" <ji...@apache.org> on 2010/02/27 01:12:05 UTC
[jira] Resolved: (ARIES-179) FrameworkMBean does not log/relay
error info
[ https://issues.apache.org/jira/browse/ARIES-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Wojtuniak resolved ARIES-179.
----------------------------------
Resolution: Fixed
Assignee: Adam Wojtuniak
I've changed the loging in Framework and UserAdmin to this format:
IOException ioex = new IOException("Can't install bundle with location: " + location);
ioex.initCause(be);
This is compatible with java 1.5 instead of new IOException(String message, Throwable cause)
introduced in 1.6.
Adam
> FrameworkMBean does not log/relay error info
> --------------------------------------------
>
> Key: ARIES-179
> URL: https://issues.apache.org/jira/browse/ARIES-179
> Project: Aries
> Issue Type: Bug
> Components: JMX
> Reporter: Thomas Diesler
> Assignee: Adam Wojtuniak
> Attachments: Framework.diff
>
>
> Various operations on the Framework don't log nor relay what went wrong in case of error.
> The typical pattern is
> public long installBundle(String location) throws IOException {
> try {
> Bundle bundle = context.installBundle(location);
> return bundle.getBundleId();
> } catch (BundleException be) {
> throw new IOException("Can't install bundle with location: " + location);
> }
> }
> Instead, I suggest an approach like this
> public long installBundle(String location) throws IOException {
> try {
> Bundle bundle = context.installBundle(location);
> return bundle.getBundleId();
> } catch (BundleException be) {
> IOException ioex = new IOException("Can't install bundle with location: " + location);
> ioex.initCause(be);
> throw ioex;
> }
> }
> Alternatively, this would also work
> public long installBundle(String location) throws IOException {
> try {
> Bundle bundle = context.installBundle(location);
> return bundle.getBundleId();
> } catch (BundleException be) {
> log.error("Can't install bundle with location: " + location, be)
> throw new IOException("Can't install bundle with location: " + location);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.