Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346993 - Cannot build on remote server
Summary: Cannot build on remote server
Status: CLOSED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Remote Tools (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: 5.0   Edit
Assignee: Greg Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 342188
  Show dependency tree
 
Reported: 2011-05-24 10:45 EDT by Thomas . CLA
Modified: 2011-05-27 15:56 EDT (History)
2 users (show)

See Also:
g.watson: review? (recoskie)


Attachments
patch (5.41 KB, patch)
2011-05-25 16:28 EDT, Greg Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas . CLA 2011-05-24 10:45:25 EDT
Build Identifier: M20110210-1200

Created a remote project with following settings in "New Project" wizard:
- New Remote Project
- Provider: Local
- Connection: Local
I selected these settings because I have Samba access to the remote files.

Then I went to "Edit Service Configuration", selected the "Local" service configuration (it's the only one) and edited the build settings:
- Service Provider: Remote Build Service
- Provider: Remote Tools
- Connection: a connection to the build host, created via the "New connection" button
- Build Configuration Location: this was pre-filled with some local path: C:/Documents and Settings/my_username/.eclipse

I found the connection to the build host in the view "Remote Environments" under "PTP Remote Host", status stopped.

However, with these settings I clicked the "Build" button, nothing happened, but I found the following entry in the "Error Log":

eclipse.buildId=M20110210-1200
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.cpp.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.cpp.product


Error
Tue May 24 16:31:24 CEST 2011
Error: org.eclipse.ptp.remote.internal.core.LocalConnection cannot be cast to org.eclipse.ptp.remote.remotetools.core.RemoteToolsConnection

java.lang.ClassCastException: org.eclipse.ptp.remote.internal.core.LocalConnection cannot be cast to org.eclipse.ptp.remote.remotetools.core.RemoteToolsConnection
at org.eclipse.ptp.remote.remotetools.core.RemoteToolsServices.getProcessBuilder(RemoteToolsServices.java:109)
at org.eclipse.ptp.rdt.core.remotemake.RemoteMakeBuilder.invokeMake(RemoteMakeBuilder.java:342)
at org.eclipse.cdt.make.core.MakeBuilder.build(MakeBuilder.java:100)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:362)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:545)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:524)
at org.eclipse.core.internal.resources.Project.build(Project.java:115)
at org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:222)
at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:162)
at org.eclipse.ui.actions.WorkspaceAction$2.runInWorkspace(WorkspaceAction.java:483)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Reproducible: Always

Steps to Reproduce:
see above
Comment 1 Greg Watson CLA 2011-05-25 16:28:23 EDT
Created attachment 196608 [details]
patch

Proposed patch to address this issue. The problem is that the RemoteBuildServiceProvider caches the connection internally and this is not updated when the connection is changed. The proposed patch removes this caching and retrieves the connection from the service provider each time. It also adds a dialog to request that the connection be opened if it is not.
Comment 2 Greg Watson CLA 2011-05-27 15:29:37 EDT
Chris, can you verify that this doesn't cause you any problems? Thanks.
Comment 3 Chris Recoskie CLA 2011-05-27 15:43:58 EDT
(In reply to comment #2)
> Chris, can you verify that this doesn't cause you any problems? Thanks.

Tried it with DStore and it seems ok.
Comment 4 Greg Watson CLA 2011-05-27 15:56:10 EDT
Applied to HEAD.