[jboss-osgi-issues] [JBoss JIRA] Commented: (JBOSGI-439) Bundle resolution error should provide reason

David Bosschaert (JIRA) jira-events at lists.jboss.org
Wed Apr 20 06:16:33 EDT 2011


    [ https://issues.jboss.org/browse/JBOSGI-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596721#comment-12596721 ] 

David Bosschaert commented on JBOSGI-439:
-----------------------------------------

I didn't see any reason come up at DEBUG level. There is a case where an exception event is logged when the 'fireEvent' param is true, but in many cases it's not, in which case the exception is simply swallowed.

{code}    public boolean ensureResolved(boolean fireEvent) {
        // If this bundle's state is INSTALLED, this method must attempt to resolve this bundle
        // If this bundle cannot be resolved, a Framework event of type FrameworkEvent.ERROR is fired
        // containing a BundleException with details of the reason this bundle could not be resolved.
        synchronized (this) {
            XModule resModule = getResolverModule();
            if (resModule.isResolved())
                return true;

            try {
                getResolverPlugin().resolve(resModule);
                return true;
            } catch (BundleException ex) {
                if (fireEvent == true)
                    getFrameworkEventsPlugin().fireFrameworkEvent(this, FrameworkEvent.ERROR, ex);

                return false;
            }
        }
    }{code}


> Bundle resolution error should provide reason
> ---------------------------------------------
>
>                 Key: JBOSGI-439
>                 URL: https://issues.jboss.org/browse/JBOSGI-439
>             Project: JBoss OSGi
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: jboss-osgi-resolver
>    Affects Versions: JBossOSGi 1.0.0 Beta11
>            Reporter: David Bosschaert
>            Assignee: David Bosschaert
>
> When a bundle fails to resolve there is an exception in the log, but the exception doesn't provide us with any information about why the resolution fails. The error reporting should be enhanced.
> 12:44:19,692 ERROR [org.jboss.as.osgi] (MSC service thread 1-2) Cannot start bundle: jboss-osgi-jndi:1.0.5.SNAPSHOT: org.osgi.framework.BundleException: Cannot resolve bundle: jboss-osgi-jndi:1.0.5.SNAPSHOT
> 	at org.jboss.osgi.framework.bundle.HostBundle.startInternal(HostBundle.java:207)
> 	at org.jboss.osgi.framework.bundle.AbstractBundle.start(AbstractBundle.java:411)
> 	at org.jboss.as.osgi.deployment.OSGiDeploymentService$OSGiDeploymentListener.processDeployment(OSGiDeploymentService.java:229)
> 	at org.jboss.as.osgi.deployment.OSGiDeploymentService$OSGiDeploymentListener.serviceStarted(OSGiDeploymentService.java:180)
> 	at org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceControllerImpl.java:1149)
> 	at org.jboss.msc.service.ServiceControllerImpl.access$2300(ServiceControllerImpl.java:44)
> 	at org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:1513)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_20]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20]
> 	at java.lang.Thread.run(Thread.java:619) [:1.6.0_20]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-osgi-issues mailing list