Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311789 - Install fails when running on UNC path
Summary: Install fails when running on UNC path
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 RC1   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-05 16:12 EDT by John Arthorne CLA
Modified: 2010-05-05 17:14 EDT (History)
2 users (show)

See Also:
dj.houghton: review+


Attachments
Fix (2.26 KB, patch)
2010-05-05 16:14 EDT, John Arthorne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.