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

Konrad Windszus edited comment on SLING-3687 at 6/23/14 2:08 PM:
-----------------------------------------------------------------

The problem is in SelectionUtils line 56 
(https://github.com/apache/sling/blob/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/SelectionUtils.java#L56).
 The ServerUtil.getModule returns only the module
{code}
Module[nc-website-components-package,org.eclipse.jst.jee.server:nc-website-components-package]
{code}

whereas ServerUtil.getModules would return two items
{code}
[Module[nc-website-components-package,org.eclipse.jst.jee.server:nc-website-components-package],
 
Module[nc-website-components-package,org.apache.sling.ide.contentModuleFactory:nc-website-components-package]]
{code}

Only the second one is relevant. Therefore please replace the call of 
ServerUtil.getModule with ServerUtil.getModules and evaluate all returned 
modules.

The javadoc of ServerUtil.getModule even states that 
(http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.servertools.doc.isv%2Fhtml%2Fapi_reference%2Forg%2Feclipse%2Fwst%2Fserver%2Fcore%2FServerUtil.html)
{code}
...
Returns the module contained within the given project. If more than one module 
is contained with the project, this method will return an arbitrary module 
unless the module factory defines an ordering. If there might be multiple 
modules in a project, users should typically use getModules(IProject) instead. 
...
{code}


was (Author: kwin):
The problem is in SelectionUtils line 56 
(https://github.com/apache/sling/blob/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/SelectionUtils.java#L56).
 The ServerUtil.getModule returns only the module
{code}
Module[nc-website-components-package,org.eclipse.jst.jee.server:nc-website-components-package]
{code}

whereas ServerUtil.getModules would return two items
{code}
[Module[nc-website-components-package,org.eclipse.jst.jee.server:nc-website-components-package],
 
Module[nc-website-components-package,org.apache.sling.ide.contentModuleFactory:nc-website-components-package]]
{code}

Only the second one is relevant. Therefore please replace the call of 
ServerUtil.getModule with ServerUtil.getModules and evaluate all returned 
modules.

> "The selected project is not configured with/added to any Sling server" 
> during Sling Import or Export
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SLING-3687
>                 URL: https://issues.apache.org/jira/browse/SLING-3687
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Sling Eclipse IDE 1.0.0
>            Reporter: Konrad Windszus
>             Fix For: Sling Eclipse IDE 1.0.2
>
>         Attachments: SLING-3687.png
>
>
> Although the module was already added to the Sling Server (and was even 
> synchronized and therefore obviously has the right facets), I can neither 
> user Export nor Import because both wizards fail with the message
> {code}
> The selected project is not configured with/added to any Sling server
> {code}
> Please compare with the attached screenshot. Enabling the tracing does not 
> reveal any other log statements related to that.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to