You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Justin Edelson (JIRA)" <ji...@apache.org> on 2009/11/30 17:28:20 UTC

[jira] Created: (SLING-1210) BootstrapInstaller will attempt (and fail) to start fragment bundles

BootstrapInstaller will attempt (and fail) to start fragment bundles
--------------------------------------------------------------------

                 Key: SLING-1210
                 URL: https://issues.apache.org/jira/browse/SLING-1210
             Project: Sling
          Issue Type: Bug
          Components: Launchpad
    Affects Versions: Launchpad Base 2.1.0
            Reporter: Justin Edelson


If you put a fragment bundle in the resource path scanned by BootstrapInstaller, it will attempt to start it, which fails because fragment bundles can't be started.

I'll provide this as a proper patch soon. Here's an outline of the change:

new method: 
    private static boolean isFragment(Bundle bundle) {
        Dictionary headerMap = bundle.getHeaders();
        return headerMap.get(Constants.FRAGMENT_HOST) != null;
    }

wrap bundle.start() with;
if (!isFragment(bundle)) {
                bundle.start();
            }

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


[jira] Commented: (SLING-1210) BootstrapInstaller will attempt (and fail) to start fragment bundles

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783787#action_12783787 ] 

Felix Meschberger commented on SLING-1210:
------------------------------------------

Is this a real problem ? IIRC this is just a null-op ?

Your patch is basically fine, except for the isFragment check, which we might want to base on the PackageAdmin.getBundleType(Bundle) method.

> BootstrapInstaller will attempt (and fail) to start fragment bundles
> --------------------------------------------------------------------
>
>                 Key: SLING-1210
>                 URL: https://issues.apache.org/jira/browse/SLING-1210
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Justin Edelson
>
> If you put a fragment bundle in the resource path scanned by BootstrapInstaller, it will attempt to start it, which fails because fragment bundles can't be started.
> I'll provide this as a proper patch soon. Here's an outline of the change:
> new method: 
>     private static boolean isFragment(Bundle bundle) {
>         Dictionary headerMap = bundle.getHeaders();
>         return headerMap.get(Constants.FRAGMENT_HOST) != null;
>     }
> wrap bundle.start() with;
> if (!isFragment(bundle)) {
>                 bundle.start();
>             }

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


[jira] Updated: (SLING-1210) BootstrapInstaller will attempt (and fail) to start fragment bundles

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

Justin Edelson updated SLING-1210:
----------------------------------

    Priority: Minor  (was: Major)

changing priority

> BootstrapInstaller will attempt (and fail) to start fragment bundles
> --------------------------------------------------------------------
>
>                 Key: SLING-1210
>                 URL: https://issues.apache.org/jira/browse/SLING-1210
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Justin Edelson
>            Priority: Minor
>
> If you put a fragment bundle in the resource path scanned by BootstrapInstaller, it will attempt to start it, which fails because fragment bundles can't be started.
> I'll provide this as a proper patch soon. Here's an outline of the change:
> new method: 
>     private static boolean isFragment(Bundle bundle) {
>         Dictionary headerMap = bundle.getHeaders();
>         return headerMap.get(Constants.FRAGMENT_HOST) != null;
>     }
> wrap bundle.start() with;
> if (!isFragment(bundle)) {
>                 bundle.start();
>             }

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


[jira] Updated: (SLING-1210) BootstrapInstaller will attempt (and fail) to start fragment bundles

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

Felix Meschberger updated SLING-1210:
-------------------------------------

    Attachment:     (was: SLING-1210.patch)

> BootstrapInstaller will attempt (and fail) to start fragment bundles
> --------------------------------------------------------------------
>
>                 Key: SLING-1210
>                 URL: https://issues.apache.org/jira/browse/SLING-1210
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Justin Edelson
>            Assignee: Felix Meschberger
>            Priority: Minor
>         Attachments: SLING-1210-fmeschbe.patch
>
>
> If you put a fragment bundle in the resource path scanned by BootstrapInstaller, it will attempt to start it, which fails because fragment bundles can't be started.
> I'll provide this as a proper patch soon. Here's an outline of the change:
> new method: 
>     private static boolean isFragment(Bundle bundle) {
>         Dictionary headerMap = bundle.getHeaders();
>         return headerMap.get(Constants.FRAGMENT_HOST) != null;
>     }
> wrap bundle.start() with;
> if (!isFragment(bundle)) {
>                 bundle.start();
>             }

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


[jira] Resolved: (SLING-1210) BootstrapInstaller will attempt (and fail) to start fragment bundles

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

Felix Meschberger resolved SLING-1210.
--------------------------------------

       Resolution: Fixed
    Fix Version/s:  Launchpad Base 2.2.0

Thanks for reporting the issue. I have applied the patch in Rev. 887014

> BootstrapInstaller will attempt (and fail) to start fragment bundles
> --------------------------------------------------------------------
>
>                 Key: SLING-1210
>                 URL: https://issues.apache.org/jira/browse/SLING-1210
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Justin Edelson
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For:  Launchpad Base 2.2.0
>
>         Attachments: SLING-1210-fmeschbe.patch
>
>
> If you put a fragment bundle in the resource path scanned by BootstrapInstaller, it will attempt to start it, which fails because fragment bundles can't be started.
> I'll provide this as a proper patch soon. Here's an outline of the change:
> new method: 
>     private static boolean isFragment(Bundle bundle) {
>         Dictionary headerMap = bundle.getHeaders();
>         return headerMap.get(Constants.FRAGMENT_HOST) != null;
>     }
> wrap bundle.start() with;
> if (!isFragment(bundle)) {
>                 bundle.start();
>             }

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


[jira] Updated: (SLING-1210) BootstrapInstaller will attempt (and fail) to start fragment bundles

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

Felix Meschberger updated SLING-1210:
-------------------------------------

    Attachment: SLING-1210-fmeschbe.patch

Applying attached patch (must have the ASF granted box checked and contains a fix to the key check, Dictionary does not have contains(String))

> BootstrapInstaller will attempt (and fail) to start fragment bundles
> --------------------------------------------------------------------
>
>                 Key: SLING-1210
>                 URL: https://issues.apache.org/jira/browse/SLING-1210
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Justin Edelson
>            Assignee: Felix Meschberger
>            Priority: Minor
>         Attachments: SLING-1210-fmeschbe.patch
>
>
> If you put a fragment bundle in the resource path scanned by BootstrapInstaller, it will attempt to start it, which fails because fragment bundles can't be started.
> I'll provide this as a proper patch soon. Here's an outline of the change:
> new method: 
>     private static boolean isFragment(Bundle bundle) {
>         Dictionary headerMap = bundle.getHeaders();
>         return headerMap.get(Constants.FRAGMENT_HOST) != null;
>     }
> wrap bundle.start() with;
> if (!isFragment(bundle)) {
>                 bundle.start();
>             }

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


[jira] Commented: (SLING-1210) BootstrapInstaller will attempt (and fail) to start fragment bundles

Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783797#action_12783797 ] 

Justin Edelson commented on SLING-1210:
---------------------------------------

start() throws a BundleException which BootstrapInstaller catches and logs. So it's not a severe problem, just an annoyance (and slightly inefficient to create the BundleException instance).

Looking at PackageAdmin, the check should actually be:
return headerMap.contains(Constants.FRAGMENT_HOST);

> BootstrapInstaller will attempt (and fail) to start fragment bundles
> --------------------------------------------------------------------
>
>                 Key: SLING-1210
>                 URL: https://issues.apache.org/jira/browse/SLING-1210
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Justin Edelson
>
> If you put a fragment bundle in the resource path scanned by BootstrapInstaller, it will attempt to start it, which fails because fragment bundles can't be started.
> I'll provide this as a proper patch soon. Here's an outline of the change:
> new method: 
>     private static boolean isFragment(Bundle bundle) {
>         Dictionary headerMap = bundle.getHeaders();
>         return headerMap.get(Constants.FRAGMENT_HOST) != null;
>     }
> wrap bundle.start() with;
> if (!isFragment(bundle)) {
>                 bundle.start();
>             }

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


[jira] Assigned: (SLING-1210) BootstrapInstaller will attempt (and fail) to start fragment bundles

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

Felix Meschberger reassigned SLING-1210:
----------------------------------------

    Assignee: Felix Meschberger

> BootstrapInstaller will attempt (and fail) to start fragment bundles
> --------------------------------------------------------------------
>
>                 Key: SLING-1210
>                 URL: https://issues.apache.org/jira/browse/SLING-1210
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Justin Edelson
>            Assignee: Felix Meschberger
>            Priority: Minor
>         Attachments: SLING-1210-fmeschbe.patch
>
>
> If you put a fragment bundle in the resource path scanned by BootstrapInstaller, it will attempt to start it, which fails because fragment bundles can't be started.
> I'll provide this as a proper patch soon. Here's an outline of the change:
> new method: 
>     private static boolean isFragment(Bundle bundle) {
>         Dictionary headerMap = bundle.getHeaders();
>         return headerMap.get(Constants.FRAGMENT_HOST) != null;
>     }
> wrap bundle.start() with;
> if (!isFragment(bundle)) {
>                 bundle.start();
>             }

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