You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2010/01/06 16:19:54 UTC

[jira] Created: (SLING-1273) Launchpad Loader uses fragile file timestamp comparison to update launcher jar

Launchpad Loader uses fragile file timestamp comparison to update launcher jar
------------------------------------------------------------------------------

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


If the timestamp of the org.apache.sling.launchpad.base.jar file in the sling home folder is set in the future by mistake (like happens sometimes when copying/restoring the file), the Sling Loader will not upgrade it anymore, even if it has a more recent version.

As that launcher jar is built as a bundle, we should use the bundle's Bnd-LastModified header (or even the full version number) to decide whether to update the launcher jar.

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


[jira] Resolved: (SLING-1273) Launchpad Loader uses fragile file timestamp comparison to update launcher jar

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

Bertrand Delacretaz resolved SLING-1273.
----------------------------------------

       Resolution: Fixed
    Fix Version/s:  Launchpad Base 2.2.0

Implemented in revision 897151, using BundleVersionInfo from SLING-1278 to compare launcher jar versions and select the most recent one.

Also added logging about launcher jar version, installation and replacement, to make troubleshooting easier.

Tested as follows, using launchpad/app, webapp and testing projects:
1. Delete sling home folder and start -> ok, launcher jar J1 extracted to sling home from sling jar or war file, named with a timestamp at the end.
2. Stop and restart, launcher jar kept as is but renamed without timestamp
3. Copy an old launcher jar to sling home, restart, it is correctly deleted and not used
4. Same but set timestamp in the future on old jar, also correctly deleted and not used (that's what failed before)
5. Copy more recent launcher jar J2 to sling home, restart -> ok, new jar is used, old one deleted
6. Restart once again, J2 still used, ok
7. Stop, delete J2, restart -> J1 used again, ok

"More recent" is defined by BundleVersionInfo.compareTo().


> Launchpad Loader uses fragile file timestamp comparison to update launcher jar
> ------------------------------------------------------------------------------
>
>                 Key: SLING-1273
>                 URL: https://issues.apache.org/jira/browse/SLING-1273
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Bertrand Delacretaz
>             Fix For:  Launchpad Base 2.2.0
>
>
> If the timestamp of the org.apache.sling.launchpad.base.jar file in the sling home folder is set in the future by mistake (like happens sometimes when copying/restoring the file), the Sling Loader will not upgrade it anymore, even if it has a more recent version.
> As that launcher jar is built as a bundle, we should use the bundle's Bnd-LastModified header (or even the full version number) to decide whether to update the launcher jar.

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


[jira] Resolved: (SLING-1273) Launchpad Loader uses fragile file timestamp comparison to update launcher jar

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

Bertrand Delacretaz resolved SLING-1273.
----------------------------------------

      Assignee: Bertrand Delacretaz
    Resolution: Fixed

Fixed in revision 935889

> Launchpad Loader uses fragile file timestamp comparison to update launcher jar
> ------------------------------------------------------------------------------
>
>                 Key: SLING-1273
>                 URL: https://issues.apache.org/jira/browse/SLING-1273
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Bertrand Delacretaz
>            Assignee: Bertrand Delacretaz
>             Fix For:  Launchpad Base 2.2.0
>
>
> If the timestamp of the org.apache.sling.launchpad.base.jar file in the sling home folder is set in the future by mistake (like happens sometimes when copying/restoring the file), the Sling Loader will not upgrade it anymore, even if it has a more recent version.
> As that launcher jar is built as a bundle, we should use the bundle's Bnd-LastModified header (or even the full version number) to decide whether to update the launcher jar.

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


[jira] Commented: (SLING-1273) Launchpad Loader uses fragile file timestamp comparison to update launcher jar

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

Felix Meschberger commented on SLING-1273:
------------------------------------------

Wouldn't it be enough to just include the bundleversion subpackage from the Commons OSGi bundle ?

> Launchpad Loader uses fragile file timestamp comparison to update launcher jar
> ------------------------------------------------------------------------------
>
>                 Key: SLING-1273
>                 URL: https://issues.apache.org/jira/browse/SLING-1273
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Bertrand Delacretaz
>             Fix For:  Launchpad Base 2.2.0
>
>
> If the timestamp of the org.apache.sling.launchpad.base.jar file in the sling home folder is set in the future by mistake (like happens sometimes when copying/restoring the file), the Sling Loader will not upgrade it anymore, even if it has a more recent version.
> As that launcher jar is built as a bundle, we should use the bundle's Bnd-LastModified header (or even the full version number) to decide whether to update the launcher jar.

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


[jira] Reopened: (SLING-1273) Launchpad Loader uses fragile file timestamp comparison to update launcher jar

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

Bertrand Delacretaz reopened SLING-1273:
----------------------------------------


> Wouldn't it be enough to just include the bundleversion subpackage 
> from the Commons OSGi bundle ? 

Right, that should be sufficient. Reopening to make this change.

> Launchpad Loader uses fragile file timestamp comparison to update launcher jar
> ------------------------------------------------------------------------------
>
>                 Key: SLING-1273
>                 URL: https://issues.apache.org/jira/browse/SLING-1273
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Bertrand Delacretaz
>             Fix For:  Launchpad Base 2.2.0
>
>
> If the timestamp of the org.apache.sling.launchpad.base.jar file in the sling home folder is set in the future by mistake (like happens sometimes when copying/restoring the file), the Sling Loader will not upgrade it anymore, even if it has a more recent version.
> As that launcher jar is built as a bundle, we should use the bundle's Bnd-LastModified header (or even the full version number) to decide whether to update the launcher jar.

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