You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Davide Maestroni (JIRA)" <ji...@apache.org> on 2010/03/15 10:51:27 UTC
[jira] Created: (SLING-1440) Overwrite rule of bundle initial
content cannot be switched back to "false"
Overwrite rule of bundle initial content cannot be switched back to "false"
---------------------------------------------------------------------------
Key: SLING-1440
URL: https://issues.apache.org/jira/browse/SLING-1440
Project: Sling
Issue Type: Bug
Components: Installer
Affects Versions: OSGi Installer 3.0.2
Environment: Windows XP, Jetty Hightide 7
Reporter: Davide Maestroni
I came across an issue with the <Sling-Initial-Content> setting in my bundle.
As far as I set it to "SLING-INF/content;overwrite:=false" everything works correctly, i.e. when I re-deploy the bundle the content of the repository is still there. But, after the first time I deploy it with "SLING-INF/content;overwrite:=true" there's no way to return to the previous setting. In fact, even if I re-deploy the bundle with the original configuration ("SLING-INF/content;overwrite:=false"), the content is deleted every time.
Here is what I did:
1) deploy the bundle with "overwrite:=false"
2) add some nodes
3) deploy the bundle with "overwrite:=false", the nodes are still there (OK)
4) deploy the bundle with "overwrite:=true", the nodes are deleted (OK)
5) add some nodes
6) deploy the bundle with "overwrite:=false", the nodes are not there (OK, since uninstall was implicitly true)
7) add some nodes
8) deploy the bundle with "overwrite:=false", the nodes are not there anymore! (NG)
9) add some nodes
10) deploy the bundle with "overwrite:=false", the nodes are still not there! (NG)
I tried also to explicitly set the "uninstall" property but with no luck.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SLING-1440) Overwrite rule of bundle initial
content cannot be switched back to "false"
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved SLING-1440.
-------------------------------------
Resolution: Fixed
Thanks for testing, Davide!
I've applied the patch in revision 931611
> Overwrite rule of bundle initial content cannot be switched back to "false"
> ---------------------------------------------------------------------------
>
> Key: SLING-1440
> URL: https://issues.apache.org/jira/browse/SLING-1440
> Project: Sling
> Issue Type: Bug
> Components: JCR
> Affects Versions: JCR Contentloader 2.0.6
> Environment: Windows XP, Jetty Hightide 7
> Reporter: Davide Maestroni
> Assignee: Carsten Ziegeler
> Fix For: JCR ContentLoader 2.0.8
>
>
> I came across an issue with the <Sling-Initial-Content> setting in my bundle.
> As far as I set it to "SLING-INF/content;overwrite:=false" everything works correctly, i.e. when I re-deploy the bundle the content of the repository is still there. But, after the first time I deploy it with "SLING-INF/content;overwrite:=true" there's no way to return to the previous setting. In fact, even if I re-deploy the bundle with the original configuration ("SLING-INF/content;overwrite:=false"), the content is deleted every time.
> Here is what I did:
> 1) deploy the bundle with "overwrite:=false"
> 2) add some nodes
> 3) deploy the bundle with "overwrite:=false", the nodes are still there (OK)
> 4) deploy the bundle with "overwrite:=true", the nodes are deleted (OK)
> 5) add some nodes
> 6) deploy the bundle with "overwrite:=false", the nodes are not there (OK, since uninstall was implicitly true)
> 7) add some nodes
> 8) deploy the bundle with "overwrite:=false", the nodes are not there anymore! (NG)
> 9) add some nodes
> 10) deploy the bundle with "overwrite:=false", the nodes are still not there! (NG)
> I tried also to explicitly set the "uninstall" property but with no luck.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-1440) Overwrite rule of bundle initial
content cannot be switched back to "false"
Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Edelson closed SLING-1440.
---------------------------------
> Overwrite rule of bundle initial content cannot be switched back to "false"
> ---------------------------------------------------------------------------
>
> Key: SLING-1440
> URL: https://issues.apache.org/jira/browse/SLING-1440
> Project: Sling
> Issue Type: Bug
> Components: JCR
> Affects Versions: JCR Contentloader 2.0.6
> Environment: Windows XP, Jetty Hightide 7
> Reporter: Davide Maestroni
> Assignee: Carsten Ziegeler
> Fix For: JCR ContentLoader 2.1.0
>
>
> I came across an issue with the <Sling-Initial-Content> setting in my bundle.
> As far as I set it to "SLING-INF/content;overwrite:=false" everything works correctly, i.e. when I re-deploy the bundle the content of the repository is still there. But, after the first time I deploy it with "SLING-INF/content;overwrite:=true" there's no way to return to the previous setting. In fact, even if I re-deploy the bundle with the original configuration ("SLING-INF/content;overwrite:=false"), the content is deleted every time.
> Here is what I did:
> 1) deploy the bundle with "overwrite:=false"
> 2) add some nodes
> 3) deploy the bundle with "overwrite:=false", the nodes are still there (OK)
> 4) deploy the bundle with "overwrite:=true", the nodes are deleted (OK)
> 5) add some nodes
> 6) deploy the bundle with "overwrite:=false", the nodes are not there (OK, since uninstall was implicitly true)
> 7) add some nodes
> 8) deploy the bundle with "overwrite:=false", the nodes are not there anymore! (NG)
> 9) add some nodes
> 10) deploy the bundle with "overwrite:=false", the nodes are still not there! (NG)
> I tried also to explicitly set the "uninstall" property but with no luck.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-1440) Overwrite rule of bundle initial
content cannot be switched back to "false"
Posted by "Davide Maestroni (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854572#action_12854572 ]
Davide Maestroni commented on SLING-1440:
-----------------------------------------
Hi Carsten,
I tried your patch and can confirm that the issue is gone.
Thank you very much!
> Overwrite rule of bundle initial content cannot be switched back to "false"
> ---------------------------------------------------------------------------
>
> Key: SLING-1440
> URL: https://issues.apache.org/jira/browse/SLING-1440
> Project: Sling
> Issue Type: Bug
> Components: JCR
> Affects Versions: JCR Contentloader 2.0.6
> Environment: Windows XP, Jetty Hightide 7
> Reporter: Davide Maestroni
> Assignee: Carsten Ziegeler
> Fix For: JCR ContentLoader 2.0.8
>
>
> I came across an issue with the <Sling-Initial-Content> setting in my bundle.
> As far as I set it to "SLING-INF/content;overwrite:=false" everything works correctly, i.e. when I re-deploy the bundle the content of the repository is still there. But, after the first time I deploy it with "SLING-INF/content;overwrite:=true" there's no way to return to the previous setting. In fact, even if I re-deploy the bundle with the original configuration ("SLING-INF/content;overwrite:=false"), the content is deleted every time.
> Here is what I did:
> 1) deploy the bundle with "overwrite:=false"
> 2) add some nodes
> 3) deploy the bundle with "overwrite:=false", the nodes are still there (OK)
> 4) deploy the bundle with "overwrite:=true", the nodes are deleted (OK)
> 5) add some nodes
> 6) deploy the bundle with "overwrite:=false", the nodes are not there (OK, since uninstall was implicitly true)
> 7) add some nodes
> 8) deploy the bundle with "overwrite:=false", the nodes are not there anymore! (NG)
> 9) add some nodes
> 10) deploy the bundle with "overwrite:=false", the nodes are still not there! (NG)
> I tried also to explicitly set the "uninstall" property but with no luck.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-1440) Overwrite rule of bundle initial
content cannot be switched back to "false"
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler updated SLING-1440:
------------------------------------
Component/s: (was: Installer)
JCR
Affects Version/s: (was: OSGi Installer 3.0.2)
JCR Contentloader 2.0.6
Fix Version/s: JCR ContentLoader 2.0.8
Assignee: Carsten Ziegeler
> Overwrite rule of bundle initial content cannot be switched back to "false"
> ---------------------------------------------------------------------------
>
> Key: SLING-1440
> URL: https://issues.apache.org/jira/browse/SLING-1440
> Project: Sling
> Issue Type: Bug
> Components: JCR
> Affects Versions: JCR Contentloader 2.0.6
> Environment: Windows XP, Jetty Hightide 7
> Reporter: Davide Maestroni
> Assignee: Carsten Ziegeler
> Fix For: JCR ContentLoader 2.0.8
>
>
> I came across an issue with the <Sling-Initial-Content> setting in my bundle.
> As far as I set it to "SLING-INF/content;overwrite:=false" everything works correctly, i.e. when I re-deploy the bundle the content of the repository is still there. But, after the first time I deploy it with "SLING-INF/content;overwrite:=true" there's no way to return to the previous setting. In fact, even if I re-deploy the bundle with the original configuration ("SLING-INF/content;overwrite:=false"), the content is deleted every time.
> Here is what I did:
> 1) deploy the bundle with "overwrite:=false"
> 2) add some nodes
> 3) deploy the bundle with "overwrite:=false", the nodes are still there (OK)
> 4) deploy the bundle with "overwrite:=true", the nodes are deleted (OK)
> 5) add some nodes
> 6) deploy the bundle with "overwrite:=false", the nodes are not there (OK, since uninstall was implicitly true)
> 7) add some nodes
> 8) deploy the bundle with "overwrite:=false", the nodes are not there anymore! (NG)
> 9) add some nodes
> 10) deploy the bundle with "overwrite:=false", the nodes are still not there! (NG)
> I tried also to explicitly set the "uninstall" property but with no luck.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-1440) Overwrite rule of bundle initial
content cannot be switched back to "false"
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854053#action_12854053 ]
Carsten Ziegeler commented on SLING-1440:
-----------------------------------------
Hi Davide,
could you please try this patch to the ContentLoaderService?
Index: bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java
===================================================================
--- bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java (revision 931203)
+++ bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java (working copy)
@@ -416,6 +416,7 @@
bcNode.setProperty(ContentLoaderService.PROPERTY_CONTENT_LOADED, false);
bcNode.setProperty(PROPERTY_CONTENT_UNLOADED_AT, Calendar.getInstance());
bcNode.setProperty(PROPERTY_CONTENT_UNLOADED_BY, this.slingId);
+ bcNode.setProperty(PROPERTY_UNINSTALL_PATHS, (String[])null);
bcNode.save();
}
} catch (RepositoryException re) {
If I'm not mistaken, the problem is that once the paths for uninstalling are set, they are never cleared. The above patch fixes this.
> Overwrite rule of bundle initial content cannot be switched back to "false"
> ---------------------------------------------------------------------------
>
> Key: SLING-1440
> URL: https://issues.apache.org/jira/browse/SLING-1440
> Project: Sling
> Issue Type: Bug
> Components: JCR
> Affects Versions: JCR Contentloader 2.0.6
> Environment: Windows XP, Jetty Hightide 7
> Reporter: Davide Maestroni
> Assignee: Carsten Ziegeler
> Fix For: JCR ContentLoader 2.0.8
>
>
> I came across an issue with the <Sling-Initial-Content> setting in my bundle.
> As far as I set it to "SLING-INF/content;overwrite:=false" everything works correctly, i.e. when I re-deploy the bundle the content of the repository is still there. But, after the first time I deploy it with "SLING-INF/content;overwrite:=true" there's no way to return to the previous setting. In fact, even if I re-deploy the bundle with the original configuration ("SLING-INF/content;overwrite:=false"), the content is deleted every time.
> Here is what I did:
> 1) deploy the bundle with "overwrite:=false"
> 2) add some nodes
> 3) deploy the bundle with "overwrite:=false", the nodes are still there (OK)
> 4) deploy the bundle with "overwrite:=true", the nodes are deleted (OK)
> 5) add some nodes
> 6) deploy the bundle with "overwrite:=false", the nodes are not there (OK, since uninstall was implicitly true)
> 7) add some nodes
> 8) deploy the bundle with "overwrite:=false", the nodes are not there anymore! (NG)
> 9) add some nodes
> 10) deploy the bundle with "overwrite:=false", the nodes are still not there! (NG)
> I tried also to explicitly set the "uninstall" property but with no luck.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.