You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jesse Glick (JIRA)" <ji...@apache.org> on 2010/03/05 22:13:27 UTC

[jira] Created: (FELIX-2177) Fragment bundles not loaded after second start when using autodeploy

Fragment bundles not loaded after second start when using autodeploy
--------------------------------------------------------------------

                 Key: FELIX-2177
                 URL: https://issues.apache.org/jira/browse/FELIX-2177
             Project: Felix
          Issue Type: Bug
          Components: Main
    Affects Versions: felix-2.0.3
         Environment: JDK 6, Linux. felix-framework 2.0.3, felix-main 2.0.2.
            Reporter: Jesse Glick


After http://hg.netbeans.org/core-main/rev/6a05c30c5d0b, I can translate a NetBeans module suite to OSGi bundles and load them including branding/localization using fragment bundles. For example, with NetBeans' "FeedReader" demo app, org.netbeans.core.startup-*.jar contains a manifest

Bundle-SymbolicName: org.netbeans.core.startup
....

and a resource org/netbeans/core/startup/splash.gif, whereas core_feedreader.jar contains a manifest

Bundle-SymbolicName: org.netbeans.core.startup-branding
Fragment-Host: org.netbeans.core.startup

and a resource org/netbeans/core/startup/splash_feedreader.gif providing branding (akin to localization). At runtime, Bundle.getResource("org/netbeans/core/startup/splash_feedreader.gif") is called before Bundle.getResource("org/netbeans/core/startup/splash.gif") to permit the branding override.

This all works fine when I create a directory of bundles and launch Felix using -b on that directory, an empty cache dir, and felix.auto.deploy.action=uninstall,install,update,start.

But when I launch Felix again using the same cache dir (without first deleting its contents), none of the resources from the fragment bundles seem to be available. If I delete the bundle* subdirs of the cache dir - even just the subdirs corresponding to the fragments - before starting Felix then it works, so the problem is really with the bundle cache (as opposed to some problem with the application's own settings).

Debug printlns show the fragment bundle in state RESOLVED on the first start, INSTALLED thereafter.

Appending ";fragment-attachment=resolve-time" to the Bundle-SymbolicName of all (non-fragment) bundles in the directory does not have any effect.

AutoProcessor handling AUTO_DEPLOY_START_VALUE skips fragment bundles, since start() would be illegal on them. But why aren't they resolved as a consequence of their hosts being resolved and started?

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


[jira] Closed: (FELIX-2177) Fragment bundles not loaded after second start when using autodeploy

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

Jesse Glick closed FELIX-2177.
------------------------------


After 948547 it works as expected.

> Fragment bundles not loaded after second start when using autodeploy
> --------------------------------------------------------------------
>
>                 Key: FELIX-2177
>                 URL: https://issues.apache.org/jira/browse/FELIX-2177
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: framework-2.0.3
>         Environment: JDK 6, Linux. felix-framework 2.0.3, felix-main 2.0.2.
>            Reporter: Jesse Glick
>            Assignee: Richard S. Hall
>             Fix For: framework-3.0.0
>
>
> After http://hg.netbeans.org/core-main/rev/6a05c30c5d0b, I can translate a NetBeans module suite to OSGi bundles and load them including branding/localization using fragment bundles. For example, with NetBeans' "FeedReader" demo app, org.netbeans.core.startup-*.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup
> ....
> and a resource org/netbeans/core/startup/splash.gif, whereas core_feedreader.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup-branding
> Fragment-Host: org.netbeans.core.startup
> and a resource org/netbeans/core/startup/splash_feedreader.gif providing branding (akin to localization). At runtime, Bundle.getResource("org/netbeans/core/startup/splash_feedreader.gif") is called before Bundle.getResource("org/netbeans/core/startup/splash.gif") to permit the branding override.
> This all works fine when I create a directory of bundles and launch Felix using -b on that directory, an empty cache dir, and felix.auto.deploy.action=uninstall,install,update,start.
> But when I launch Felix again using the same cache dir (without first deleting its contents), none of the resources from the fragment bundles seem to be available. If I delete the bundle* subdirs of the cache dir - even just the subdirs corresponding to the fragments - before starting Felix then it works, so the problem is really with the bundle cache (as opposed to some problem with the application's own settings).
> Debug printlns show the fragment bundle in state RESOLVED on the first start, INSTALLED thereafter.
> Appending ";fragment-attachment=resolve-time" to the Bundle-SymbolicName of all (non-fragment) bundles in the directory does not have any effect.
> AutoProcessor handling AUTO_DEPLOY_START_VALUE skips fragment bundles, since start() would be illegal on them. But why aren't they resolved as a consequence of their hosts being resolved and started?

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


[jira] Commented: (FELIX-2177) Fragment bundles not loaded after second start when using autodeploy

Posted by "Jesse Glick (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870802#action_12870802 ] 

Jesse Glick commented on FELIX-2177:
------------------------------------

Still reproducible with 2.1.0-SNAPSHOT (rev 947700) of framework & main. I build SNAPSHOT JARs and copy them over platform/modules/ext/felix*.jar in a NB 6.9 installation. Then start IDE, File > New Project, Samples > NetBeans Modules > FeedReader; right-click it and select OSGi > Run in Felix. (See http://wiki.netbeans.org/NetBeansInOSGi for background.) Correctly shows FeedReader splash screen and window title. With the addition of some println's, it seems that the three fragment bundles org.netbeans.core{,.startup,.windows}-branding are in AutoProcessor's startBundleList but it skips them (as expected), yet they are still visible somehow at runtime: bundle #3 (org.netbeans.core.startup-branding) can load bundle://13.0:2/org/netbeans/core/startup/splash_feedreader.gif (bundle #13 is org.netbeans.core.startup, its host). The println's show the same sequence when Run in Felix is invoked again, but now the generic splash screen and window title are shown, indicating that these fragments are not being loaded; bundle #3 is now INSTALLED. There seems to be no difference between first and second run in terms of timing of events (the NB integration waits until the framework has started before doing anything of its own); the only visible difference is that the fragments are RESOLVED on the first run, but only INSTALLED on the second.

> Fragment bundles not loaded after second start when using autodeploy
> --------------------------------------------------------------------
>
>                 Key: FELIX-2177
>                 URL: https://issues.apache.org/jira/browse/FELIX-2177
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: framework-2.0.3
>         Environment: JDK 6, Linux. felix-framework 2.0.3, felix-main 2.0.2.
>            Reporter: Jesse Glick
>             Fix For: framework-3.0.0
>
>
> After http://hg.netbeans.org/core-main/rev/6a05c30c5d0b, I can translate a NetBeans module suite to OSGi bundles and load them including branding/localization using fragment bundles. For example, with NetBeans' "FeedReader" demo app, org.netbeans.core.startup-*.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup
> ....
> and a resource org/netbeans/core/startup/splash.gif, whereas core_feedreader.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup-branding
> Fragment-Host: org.netbeans.core.startup
> and a resource org/netbeans/core/startup/splash_feedreader.gif providing branding (akin to localization). At runtime, Bundle.getResource("org/netbeans/core/startup/splash_feedreader.gif") is called before Bundle.getResource("org/netbeans/core/startup/splash.gif") to permit the branding override.
> This all works fine when I create a directory of bundles and launch Felix using -b on that directory, an empty cache dir, and felix.auto.deploy.action=uninstall,install,update,start.
> But when I launch Felix again using the same cache dir (without first deleting its contents), none of the resources from the fragment bundles seem to be available. If I delete the bundle* subdirs of the cache dir - even just the subdirs corresponding to the fragments - before starting Felix then it works, so the problem is really with the bundle cache (as opposed to some problem with the application's own settings).
> Debug printlns show the fragment bundle in state RESOLVED on the first start, INSTALLED thereafter.
> Appending ";fragment-attachment=resolve-time" to the Bundle-SymbolicName of all (non-fragment) bundles in the directory does not have any effect.
> AutoProcessor handling AUTO_DEPLOY_START_VALUE skips fragment bundles, since start() would be illegal on them. But why aren't they resolved as a consequence of their hosts being resolved and started?

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


[jira] Updated: (FELIX-2177) Fragment bundles not loaded after second start when using autodeploy

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-2177:
-----------------------------------

    Fix Version/s: framework-3.0.0

> Fragment bundles not loaded after second start when using autodeploy
> --------------------------------------------------------------------
>
>                 Key: FELIX-2177
>                 URL: https://issues.apache.org/jira/browse/FELIX-2177
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: framework-2.0.3
>         Environment: JDK 6, Linux. felix-framework 2.0.3, felix-main 2.0.2.
>            Reporter: Jesse Glick
>             Fix For: framework-3.0.0
>
>
> After http://hg.netbeans.org/core-main/rev/6a05c30c5d0b, I can translate a NetBeans module suite to OSGi bundles and load them including branding/localization using fragment bundles. For example, with NetBeans' "FeedReader" demo app, org.netbeans.core.startup-*.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup
> ....
> and a resource org/netbeans/core/startup/splash.gif, whereas core_feedreader.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup-branding
> Fragment-Host: org.netbeans.core.startup
> and a resource org/netbeans/core/startup/splash_feedreader.gif providing branding (akin to localization). At runtime, Bundle.getResource("org/netbeans/core/startup/splash_feedreader.gif") is called before Bundle.getResource("org/netbeans/core/startup/splash.gif") to permit the branding override.
> This all works fine when I create a directory of bundles and launch Felix using -b on that directory, an empty cache dir, and felix.auto.deploy.action=uninstall,install,update,start.
> But when I launch Felix again using the same cache dir (without first deleting its contents), none of the resources from the fragment bundles seem to be available. If I delete the bundle* subdirs of the cache dir - even just the subdirs corresponding to the fragments - before starting Felix then it works, so the problem is really with the bundle cache (as opposed to some problem with the application's own settings).
> Debug printlns show the fragment bundle in state RESOLVED on the first start, INSTALLED thereafter.
> Appending ";fragment-attachment=resolve-time" to the Bundle-SymbolicName of all (non-fragment) bundles in the directory does not have any effect.
> AutoProcessor handling AUTO_DEPLOY_START_VALUE skips fragment bundles, since start() would be illegal on them. But why aren't they resolved as a consequence of their hosts being resolved and started?

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


[jira] Updated: (FELIX-2177) Fragment bundles not loaded after second start when using autodeploy

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-2177:
-----------------------------------

    Component/s: Framework
                     (was: Main)

> Fragment bundles not loaded after second start when using autodeploy
> --------------------------------------------------------------------
>
>                 Key: FELIX-2177
>                 URL: https://issues.apache.org/jira/browse/FELIX-2177
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-2.0.3
>         Environment: JDK 6, Linux. felix-framework 2.0.3, felix-main 2.0.2.
>            Reporter: Jesse Glick
>            Assignee: Richard S. Hall
>             Fix For: framework-3.0.0
>
>
> After http://hg.netbeans.org/core-main/rev/6a05c30c5d0b, I can translate a NetBeans module suite to OSGi bundles and load them including branding/localization using fragment bundles. For example, with NetBeans' "FeedReader" demo app, org.netbeans.core.startup-*.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup
> ....
> and a resource org/netbeans/core/startup/splash.gif, whereas core_feedreader.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup-branding
> Fragment-Host: org.netbeans.core.startup
> and a resource org/netbeans/core/startup/splash_feedreader.gif providing branding (akin to localization). At runtime, Bundle.getResource("org/netbeans/core/startup/splash_feedreader.gif") is called before Bundle.getResource("org/netbeans/core/startup/splash.gif") to permit the branding override.
> This all works fine when I create a directory of bundles and launch Felix using -b on that directory, an empty cache dir, and felix.auto.deploy.action=uninstall,install,update,start.
> But when I launch Felix again using the same cache dir (without first deleting its contents), none of the resources from the fragment bundles seem to be available. If I delete the bundle* subdirs of the cache dir - even just the subdirs corresponding to the fragments - before starting Felix then it works, so the problem is really with the bundle cache (as opposed to some problem with the application's own settings).
> Debug printlns show the fragment bundle in state RESOLVED on the first start, INSTALLED thereafter.
> Appending ";fragment-attachment=resolve-time" to the Bundle-SymbolicName of all (non-fragment) bundles in the directory does not have any effect.
> AutoProcessor handling AUTO_DEPLOY_START_VALUE skips fragment bundles, since start() would be illegal on them. But why aren't they resolved as a consequence of their hosts being resolved and started?

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


[jira] Assigned: (FELIX-2177) Fragment bundles not loaded after second start when using autodeploy

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall reassigned FELIX-2177:
--------------------------------------

    Assignee: Richard S. Hall

> Fragment bundles not loaded after second start when using autodeploy
> --------------------------------------------------------------------
>
>                 Key: FELIX-2177
>                 URL: https://issues.apache.org/jira/browse/FELIX-2177
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: framework-2.0.3
>         Environment: JDK 6, Linux. felix-framework 2.0.3, felix-main 2.0.2.
>            Reporter: Jesse Glick
>            Assignee: Richard S. Hall
>             Fix For: framework-3.0.0
>
>
> After http://hg.netbeans.org/core-main/rev/6a05c30c5d0b, I can translate a NetBeans module suite to OSGi bundles and load them including branding/localization using fragment bundles. For example, with NetBeans' "FeedReader" demo app, org.netbeans.core.startup-*.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup
> ....
> and a resource org/netbeans/core/startup/splash.gif, whereas core_feedreader.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup-branding
> Fragment-Host: org.netbeans.core.startup
> and a resource org/netbeans/core/startup/splash_feedreader.gif providing branding (akin to localization). At runtime, Bundle.getResource("org/netbeans/core/startup/splash_feedreader.gif") is called before Bundle.getResource("org/netbeans/core/startup/splash.gif") to permit the branding override.
> This all works fine when I create a directory of bundles and launch Felix using -b on that directory, an empty cache dir, and felix.auto.deploy.action=uninstall,install,update,start.
> But when I launch Felix again using the same cache dir (without first deleting its contents), none of the resources from the fragment bundles seem to be available. If I delete the bundle* subdirs of the cache dir - even just the subdirs corresponding to the fragments - before starting Felix then it works, so the problem is really with the bundle cache (as opposed to some problem with the application's own settings).
> Debug printlns show the fragment bundle in state RESOLVED on the first start, INSTALLED thereafter.
> Appending ";fragment-attachment=resolve-time" to the Bundle-SymbolicName of all (non-fragment) bundles in the directory does not have any effect.
> AutoProcessor handling AUTO_DEPLOY_START_VALUE skips fragment bundles, since start() would be illegal on them. But why aren't they resolved as a consequence of their hosts being resolved and started?

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


[jira] Resolved: (FELIX-2177) Fragment bundles not loaded after second start when using autodeploy

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-2177.
------------------------------------

    Resolution: Fixed

I have committed a fix for this issue and was able to correctly get the custom splash screen on subsequent runs for your example. Please close this issue if you are satisfied, thanks.

> Fragment bundles not loaded after second start when using autodeploy
> --------------------------------------------------------------------
>
>                 Key: FELIX-2177
>                 URL: https://issues.apache.org/jira/browse/FELIX-2177
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: framework-2.0.3
>         Environment: JDK 6, Linux. felix-framework 2.0.3, felix-main 2.0.2.
>            Reporter: Jesse Glick
>            Assignee: Richard S. Hall
>             Fix For: framework-3.0.0
>
>
> After http://hg.netbeans.org/core-main/rev/6a05c30c5d0b, I can translate a NetBeans module suite to OSGi bundles and load them including branding/localization using fragment bundles. For example, with NetBeans' "FeedReader" demo app, org.netbeans.core.startup-*.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup
> ....
> and a resource org/netbeans/core/startup/splash.gif, whereas core_feedreader.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup-branding
> Fragment-Host: org.netbeans.core.startup
> and a resource org/netbeans/core/startup/splash_feedreader.gif providing branding (akin to localization). At runtime, Bundle.getResource("org/netbeans/core/startup/splash_feedreader.gif") is called before Bundle.getResource("org/netbeans/core/startup/splash.gif") to permit the branding override.
> This all works fine when I create a directory of bundles and launch Felix using -b on that directory, an empty cache dir, and felix.auto.deploy.action=uninstall,install,update,start.
> But when I launch Felix again using the same cache dir (without first deleting its contents), none of the resources from the fragment bundles seem to be available. If I delete the bundle* subdirs of the cache dir - even just the subdirs corresponding to the fragments - before starting Felix then it works, so the problem is really with the bundle cache (as opposed to some problem with the application's own settings).
> Debug printlns show the fragment bundle in state RESOLVED on the first start, INSTALLED thereafter.
> Appending ";fragment-attachment=resolve-time" to the Bundle-SymbolicName of all (non-fragment) bundles in the directory does not have any effect.
> AutoProcessor handling AUTO_DEPLOY_START_VALUE skips fragment bundles, since start() would be illegal on them. But why aren't they resolved as a consequence of their hosts being resolved and started?

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


[jira] Commented: (FELIX-2177) Fragment bundles not loaded after second start when using autodeploy

Posted by "Karl Pauls (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842033#action_12842033 ] 

Karl Pauls commented on FELIX-2177:
-----------------------------------

Sounds like a bug. Could you try with the current trunk/latest snapshot?

> Fragment bundles not loaded after second start when using autodeploy
> --------------------------------------------------------------------
>
>                 Key: FELIX-2177
>                 URL: https://issues.apache.org/jira/browse/FELIX-2177
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: felix-2.0.3
>         Environment: JDK 6, Linux. felix-framework 2.0.3, felix-main 2.0.2.
>            Reporter: Jesse Glick
>
> After http://hg.netbeans.org/core-main/rev/6a05c30c5d0b, I can translate a NetBeans module suite to OSGi bundles and load them including branding/localization using fragment bundles. For example, with NetBeans' "FeedReader" demo app, org.netbeans.core.startup-*.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup
> ....
> and a resource org/netbeans/core/startup/splash.gif, whereas core_feedreader.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup-branding
> Fragment-Host: org.netbeans.core.startup
> and a resource org/netbeans/core/startup/splash_feedreader.gif providing branding (akin to localization). At runtime, Bundle.getResource("org/netbeans/core/startup/splash_feedreader.gif") is called before Bundle.getResource("org/netbeans/core/startup/splash.gif") to permit the branding override.
> This all works fine when I create a directory of bundles and launch Felix using -b on that directory, an empty cache dir, and felix.auto.deploy.action=uninstall,install,update,start.
> But when I launch Felix again using the same cache dir (without first deleting its contents), none of the resources from the fragment bundles seem to be available. If I delete the bundle* subdirs of the cache dir - even just the subdirs corresponding to the fragments - before starting Felix then it works, so the problem is really with the bundle cache (as opposed to some problem with the application's own settings).
> Debug printlns show the fragment bundle in state RESOLVED on the first start, INSTALLED thereafter.
> Appending ";fragment-attachment=resolve-time" to the Bundle-SymbolicName of all (non-fragment) bundles in the directory does not have any effect.
> AutoProcessor handling AUTO_DEPLOY_START_VALUE skips fragment bundles, since start() would be illegal on them. But why aren't they resolved as a consequence of their hosts being resolved and started?

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


[jira] Commented: (FELIX-2177) Fragment bundles not loaded after second start when using autodeploy

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870866#action_12870866 ] 

Richard S. Hall commented on FELIX-2177:
----------------------------------------

Ok, I've been able to reproduce the issue and I narrowed the cause down to the fact that the fragments are being updated on restart. I was able to create a simpler use case to demonstrate the issue, so I will look into a fix. Thanks.

> Fragment bundles not loaded after second start when using autodeploy
> --------------------------------------------------------------------
>
>                 Key: FELIX-2177
>                 URL: https://issues.apache.org/jira/browse/FELIX-2177
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: framework-2.0.3
>         Environment: JDK 6, Linux. felix-framework 2.0.3, felix-main 2.0.2.
>            Reporter: Jesse Glick
>             Fix For: framework-3.0.0
>
>
> After http://hg.netbeans.org/core-main/rev/6a05c30c5d0b, I can translate a NetBeans module suite to OSGi bundles and load them including branding/localization using fragment bundles. For example, with NetBeans' "FeedReader" demo app, org.netbeans.core.startup-*.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup
> ....
> and a resource org/netbeans/core/startup/splash.gif, whereas core_feedreader.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup-branding
> Fragment-Host: org.netbeans.core.startup
> and a resource org/netbeans/core/startup/splash_feedreader.gif providing branding (akin to localization). At runtime, Bundle.getResource("org/netbeans/core/startup/splash_feedreader.gif") is called before Bundle.getResource("org/netbeans/core/startup/splash.gif") to permit the branding override.
> This all works fine when I create a directory of bundles and launch Felix using -b on that directory, an empty cache dir, and felix.auto.deploy.action=uninstall,install,update,start.
> But when I launch Felix again using the same cache dir (without first deleting its contents), none of the resources from the fragment bundles seem to be available. If I delete the bundle* subdirs of the cache dir - even just the subdirs corresponding to the fragments - before starting Felix then it works, so the problem is really with the bundle cache (as opposed to some problem with the application's own settings).
> Debug printlns show the fragment bundle in state RESOLVED on the first start, INSTALLED thereafter.
> Appending ";fragment-attachment=resolve-time" to the Bundle-SymbolicName of all (non-fragment) bundles in the directory does not have any effect.
> AutoProcessor handling AUTO_DEPLOY_START_VALUE skips fragment bundles, since start() would be illegal on them. But why aren't they resolved as a consequence of their hosts being resolved and started?

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


[jira] Commented: (FELIX-2177) Fragment bundles not loaded after second start when using autodeploy

Posted by "Jesse Glick (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842069#action_12842069 ] 

Jesse Glick commented on FELIX-2177:
------------------------------------

Still reproducible with 2.1.0-SNAPSHOT (rev 919644) of framework & main.

> Fragment bundles not loaded after second start when using autodeploy
> --------------------------------------------------------------------
>
>                 Key: FELIX-2177
>                 URL: https://issues.apache.org/jira/browse/FELIX-2177
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: felix-2.0.3
>         Environment: JDK 6, Linux. felix-framework 2.0.3, felix-main 2.0.2.
>            Reporter: Jesse Glick
>
> After http://hg.netbeans.org/core-main/rev/6a05c30c5d0b, I can translate a NetBeans module suite to OSGi bundles and load them including branding/localization using fragment bundles. For example, with NetBeans' "FeedReader" demo app, org.netbeans.core.startup-*.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup
> ....
> and a resource org/netbeans/core/startup/splash.gif, whereas core_feedreader.jar contains a manifest
> Bundle-SymbolicName: org.netbeans.core.startup-branding
> Fragment-Host: org.netbeans.core.startup
> and a resource org/netbeans/core/startup/splash_feedreader.gif providing branding (akin to localization). At runtime, Bundle.getResource("org/netbeans/core/startup/splash_feedreader.gif") is called before Bundle.getResource("org/netbeans/core/startup/splash.gif") to permit the branding override.
> This all works fine when I create a directory of bundles and launch Felix using -b on that directory, an empty cache dir, and felix.auto.deploy.action=uninstall,install,update,start.
> But when I launch Felix again using the same cache dir (without first deleting its contents), none of the resources from the fragment bundles seem to be available. If I delete the bundle* subdirs of the cache dir - even just the subdirs corresponding to the fragments - before starting Felix then it works, so the problem is really with the bundle cache (as opposed to some problem with the application's own settings).
> Debug printlns show the fragment bundle in state RESOLVED on the first start, INSTALLED thereafter.
> Appending ";fragment-attachment=resolve-time" to the Bundle-SymbolicName of all (non-fragment) bundles in the directory does not have any effect.
> AutoProcessor handling AUTO_DEPLOY_START_VALUE skips fragment bundles, since start() would be illegal on them. But why aren't they resolved as a consequence of their hosts being resolved and started?

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