You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Thomas Diesler (JIRA)" <ji...@apache.org> on 2010/02/27 09:54:05 UTC

[jira] Created: (ARIES-206) Spurious error messages on shutdown

Spurious error messages on shutdown
-----------------------------------

                 Key: ARIES-206
                 URL: https://issues.apache.org/jira/browse/ARIES-206
             Project: Aries
          Issue Type: Bug
          Components: JMX
            Reporter: Thomas Diesler
         Attachments: ARIES-206-20100227.patch

I see a lot spurious error messages on the console due to the framework shutting down and the LogService not being available any more.

Running org.jboss.test.osgi.fragments.FragmentTestCase
[file:/home/tdiesler/svn/jboss-osgi/trunk/testsuite/functional/target/test-libs/bundles/org.apache.aries.jmx.jar:2] Task rejected for JMX Notification dispatch of event [org.osgi.framework.BundleEvent[source=simple-fragA [6]]] - Dispatcher may have been shutdown
[file:/home/tdiesler/svn/jboss-osgi/trunk/testsuite/functional/target/test-libs/bundles/org.apache.aries.jmx.jar:3] Unregistering org.osgi.jmx.framework.FrameworkMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@2d189c with name osgi.core:type=framework,version=1.5
[file:/home/tdiesler/svn/jboss-osgi/trunk/testsuite/functional/target/test-libs/bundles/org.apache.aries.jmx.jar:3] Unregistering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@2d189c with name osgi.core:type=bundleState,version=1.5
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.655 sec

I suggest we only log messages to System.err when the JMX bundle is active or if there is an Exception to log

    private void syslog(int level, String message, Throwable exception)
    {
       if (bundle.getState() == Bundle.ACTIVE || exception != null) {
          System.err.println("[" + bundleLocation + ":" + +level + "] " + message
                + ((exception == null) ? " " : exception.toString()));
       }
    }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ARIES-206) Spurious error messages on shutdown

Posted by "Thomas Diesler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Diesler updated ARIES-206:
---------------------------------

    Attachment: ARIES-206-20100227.patch

patch attached

> Spurious error messages on shutdown
> -----------------------------------
>
>                 Key: ARIES-206
>                 URL: https://issues.apache.org/jira/browse/ARIES-206
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>         Attachments: ARIES-206-20100227.patch
>
>
> I see a lot spurious error messages on the console due to the framework shutting down and the LogService not being available any more.
> Running org.jboss.test.osgi.fragments.FragmentTestCase
> [file:/home/tdiesler/svn/jboss-osgi/trunk/testsuite/functional/target/test-libs/bundles/org.apache.aries.jmx.jar:2] Task rejected for JMX Notification dispatch of event [org.osgi.framework.BundleEvent[source=simple-fragA [6]]] - Dispatcher may have been shutdown
> [file:/home/tdiesler/svn/jboss-osgi/trunk/testsuite/functional/target/test-libs/bundles/org.apache.aries.jmx.jar:3] Unregistering org.osgi.jmx.framework.FrameworkMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@2d189c with name osgi.core:type=framework,version=1.5
> [file:/home/tdiesler/svn/jboss-osgi/trunk/testsuite/functional/target/test-libs/bundles/org.apache.aries.jmx.jar:3] Unregistering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@2d189c with name osgi.core:type=bundleState,version=1.5
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.655 sec
> I suggest we only log messages to System.err when the JMX bundle is active or if there is an Exception to log
>     private void syslog(int level, String message, Throwable exception)
>     {
>        if (bundle.getState() == Bundle.ACTIVE || exception != null) {
>           System.err.println("[" + bundleLocation + ":" + +level + "] " + message
>                 + ((exception == null) ? " " : exception.toString()));
>        }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.