Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311789

Summary: Install fails when running on UNC path
Product: [Eclipse Project] Equinox Reporter: John Arthorne <john.arthorne>
Component: p2Assignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, mober.at+eclipse
Version: 3.6Flags: dj.houghton: review+
Target Milestone: 3.6 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Fix none

Description John Arthorne CLA 2010-05-05 16:12:55 EDT
1) Unzip Eclipse SDK into a new directory
2) Under properties for the folder, Deny "Write" permission under the security
tab
3) Under properties for the install folder, select "Sharing"
4) Select "Share this folder". Give the shared folder a name ("shared")
5) In Explorer type in the address bar \\<yourhostname>\shared\eclipse
6) Double-click eclipse.exe
7) When the IDE comes up, try to install something

Error occurs:

!ENTRY org.eclipse.equinox.p2.ui 4 0 2010-05-05 15:22:31.218
!MESSAGE Profile id _SELF_ is not registered.
!STACK 0
java.lang.IllegalArgumentException: Profile id _SELF_ is not registered.
    at
org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest.createByProfileId(ProfileChangeRequest.java:49)
    at
org.eclipse.equinox.p2.operations.InstallOperation.computeProfileChangeRequest(InstallOperation.java:68)
    at
org.eclipse.equinox.p2.operations.ProfileChangeOperation.makeResolveJob(ProfileChangeOperation.java:158)
    at
org.eclipse.equinox.p2.operations.ProfileChangeOperation.resolveModal(ProfileChangeOperation.java:113)
    at
org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard$1.run(ProvisioningOperationWizard.java:206)
    at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Comment 1 John Arthorne CLA 2010-05-05 16:14:18 EDT
Created attachment 167222 [details]
Fix
Comment 2 John Arthorne CLA 2010-05-05 16:15:12 EDT
new File(URL.getFile()) is incorrect, since it discard the hostname which is essential in a UNC path. The fix is to use our URIUtil helper methods.
Comment 3 John Arthorne CLA 2010-05-05 16:27:08 EDT
Fix released.
Comment 4 Martin Oberhuber CLA 2010-05-05 17:14:35 EDT
Cool. I've added some content to http://wiki.eclipse.org/Eclipse/UNC_Paths with concrete suggestions for using URIUtil, based on what I've learnt through these recent UNC bugs. Your review of my changes would be appreciated. In general, I feel like that Wiki page could use more practical advice and a bit less theory, in order to be less confusing.