[ 
https://issues.apache.org/jira/browse/SLING-6618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15901170#comment-15901170
 ] 

Konrad Windszus edited comment on SLING-6618 at 3/8/17 12:26 PM:
-----------------------------------------------------------------

The reason why in AEM the default workspace name is {{crx.default}} is in 
com.adobe.granite.repository.impl.SlingRepositoryManager() which internally 
calls {{Jcr.with("crx.default")}} 
(http://static.javadoc.io/org.apache.jackrabbit/oak-jcr/1.6.0/org/apache/jackrabbit/oak/jcr/Jcr.html#with(java.lang.String).
 But basically whenever the workspace name is {{null}} for 
{{Repository.login(...)}} calls it should act on the default workspace (compare 
with 
https://docs.adobe.com/docs/en/spec/jsr170/javadocs/jcr-2.0/javax/jcr/Repository.html#login(javax.jcr.Credentials,%20java.lang.String)).
 This currently does not seem to be the case, while Sling IDE itself only calls 
{{org.apache.jackrabbit.vault.davex.DAVExRepositoryFactory}} this does not seem 
to correctly resolve to the correct default workspace. Basically that should 
pass {{null}} as {{workspaceName}} in 
https://github.com/apache/jackrabbit/blob/60f44f7d5c67c869ab4dbc7b620c5b7183a0423d/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/Spi2davexRepositoryServiceFactory.java#L128
 which is currently not possible, because that is either any explicit String 
being set or just the empty string, but never null.


was (Author: kwin):
The reason why in AEM the default workspace name is {{crx.default}} is in 
com.adobe.granite.repository.impl.SlingRepositoryManager() which internally 
calls {{Jcr.with("crx.default")}} 
(http://static.javadoc.io/org.apache.jackrabbit/oak-jcr/1.6.0/org/apache/jackrabbit/oak/jcr/Jcr.html#with(java.lang.String).
 But basically whenever the workspace name is {{null}} for 
{{Repository.login(...)}} calls it should act on the default workspace (compare 
with 
https://docs.adobe.com/docs/en/spec/jsr170/javadocs/jcr-2.0/javax/jcr/Repository.html#login(javax.jcr.Credentials,%20java.lang.String)).
 This currently does not seem to be the case, while Sling IDE itself only calls 
{{org.apache.jackrabbit.vault.davex.DAVExRepositoryFactory}} this does not seem 
to correctly resolve to the correct default workspace.

> Specify crx.default as workspace for AEM servers
> ------------------------------------------------
>
>                 Key: SLING-6618
>                 URL: https://issues.apache.org/jira/browse/SLING-6618
>             Project: Sling
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: Sling Eclipse IDE 1.0.10
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>             Fix For: Sling Eclipse IDE 1.2.0
>
>         Attachments: SLING-6618.patch
>
>
> The current impl-vlt does try to connect to two different repository urls - 
> one for sling and one for crx. In the case of the latter, it apparently needs 
> to subsequently give the default workspace name (crx.default) to the login 
> method - otherwise, trying to connect to the AEM server fails with 
> "precondition failed" messages.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to