[
https://issues.jboss.org/browse/JBIDE-15653?page=com.atlassian.jira.plugi...
]
Andre Dietisheim edited comment on JBIDE-15653 at 10/15/13 12:49 PM:
---------------------------------------------------------------------
The problem arises when the OpenShiftPublishMethod executes #refreshProject:
{code}
protected void refreshProject(final IProject project, IProgressMonitor monitor) throws
CoreException {
// Already inside a workspace scheduling rule
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
{code}
The cause to this rule conflict (the lock in Server#PublishJob does not include the
project that we want to publish) is due to to the fact that our server adapter has no
module:
{code:title=OpenShiftServerAdapterFactory#getModules}
private List<IModule> getModules(List<IProject> importedProjects) {
Iterator<IProject> i = importedProjects.iterator();
ArrayList<IModule> toAdd = new ArrayList<IModule>();
while (i.hasNext()) {
IProject p = i.next();
IModule[] m = ServerUtil.getModules(p);
if (m != null && m.length > 0) {
toAdd.addAll(Arrays.asList(m));
}
}
return toAdd;
}
{code}
*ServerUtil.getModules(p)* returns *null*,The cause to this is that there's no module
factory for OpenShift projects.
The Server thus has therefore no locks on the project that is being published and that we
want to refresh.
The call to #refreshLocal will fail since the Server#PublishJon complains about the
project not being included in its scheduling rule
was (Author: adietish):
The problem arises when the OpenShiftPublishMethod executes #refreshProject:
{code}
protected void refreshProject(final IProject project, IProgressMonitor monitor) throws
CoreException {
// Already inside a workspace scheduling rule
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
{code}
The call to #refreshLocal will fail since the Server#PublishJon complains about the
project not being included in its scheduling rule
Import application wizard: Errors "Could not publish: Attempted
to begin rule"
------------------------------------------------------------------------------
Key: JBIDE-15653
URL:
https://issues.jboss.org/browse/JBIDE-15653
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.2.0.Alpha1
Reporter: Andre Dietisheim
Assignee: Andre Dietisheim
Priority: Blocker
Fix For: 4.2.0.Alpha1
Attachments: could-not-import.png, gitignore-committed-locally.png
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira