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

Bug 331024

Summary: [IDE] Eclipse can't access network drives initially.
Product: [Eclipse Project] Platform Reporter: Kyle Tirak <lonefenris>
Component: IDEAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, der_spieler, sptaszkiewicz, Szymon.Brandys, yevshif
Version: 3.6.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug
Attachments:
Description Flags
Snippet none

Description Kyle Tirak CLA 2010-11-24 09:52:43 EST
Build Identifier: M20100909-0800

I have a mapped network drive that I keep my workspace on. Whenever I start Eclipse for the first time, I get an error about the workspace being in use or inaccessible. 

On the choose a workspace screen, if I change nothing nothing in the path and click okay, I will still get the error. However, if I click browse, and choose the workspace folder from the network drive, it will start normally. The path on the 'choose a workspace' window does not change when I do this. I should also mention that in the 'browse' window, my network drives show a red 'X' on them (this is only in the browse window in Eclipse, they still show and work fine in Windows). Subsequent exits and starts of Eclipse without a system reboot work normally.

Also related to this, I believe: There is a subversion repository on my other mapped network drive. When I try to access this repository through Subversive for the first time in Eclipse, I receive an ra_local error and it reports that it cannot open the location of the repository. If I then open a file on that mapped drive -- any file at all, it does not need to be in the repository location -- in Eclipse, then subsequent attempts to access the subversion repository with Subversive will work normally. Again, exits and starts of Eclipse after this do not change it, however, a reboot of the system will set it back to being inaccessible initially. 

Reproducible: Always

Steps to Reproduce:
1. Set workspace to a location in mapped network drive, and set Eclipse to always use that location.
2. Reboot system.
3. Open Eclipse, receive workspace access error.
Comment 1 Dani Megert CLA 2010-11-25 02:37:04 EST
This looks more like a Platform Resource problem.
Comment 2 Szymon Ptaszkiewicz CLA 2010-11-26 12:18:06 EST
I knew I saw this bug already. This looks like another duplicate of bug 61528.
Comment 3 Kyle Tirak CLA 2010-11-26 12:49:28 EST
I'm not sure. That bug sounds like a different behavior at least. For instance, what I do in explorer has no impact on my bug. To me it seems like Eclipse doesn't see a mapped network drive unless navigated to in Eclipse's file chooser. I don't see how it could be a filesystem bug, anyway, as everything else I run behaves normally with it -- only Eclipse has an issue and even then, that issue goes away once I select the the mapped drive in a file chooser. 

I suppose it is possible this could be a bug in Java itself, though...
Comment 4 Szymon Ptaszkiewicz CLA 2010-11-29 09:16:30 EST
Created attachment 184038 [details]
Snippet

This is easy to check if this is Java issue. I have uploaded simple test case where you can check if you can read from your mapped network drive using only Java methods. To test it you need to do the following steps:

1. Create a text file with some random text content on your mapped drive and update the path in the test case so that it points to your file.
2. Reboot your OS so that any opened connections to mapped drives are lost.
3. After reboot and before using your mapped network drive in any way run the test case to see if Java methods are able to read from that file. What are the results?
4. Then open mapped drive in Explorer and run the test case again. What are the results now?

This test should show if pure Java code can access unconnected network drive. If not then this is duplicate of 61528 according to bug 61528 comment 1.
Comment 5 Kyle Tirak CLA 2010-11-29 10:29:11 EST
Thanks! I had just opened up a text editor to write a test program when I got the bug update email. :-)

I placed a test file on both mapped drives and rebooted. I ran your test program from the command line. The test file was output fine both before and after opening the mapped drive in Explorer. 

I then thought I'd try to run the test file from within an Eclipse project. When I opened Eclipse, I got the same workspace not available error as always despite having been able to read the file on that mapped drive and opening the drive in Explorer. Again, it advanced after selecting Browse from the workspace selection window and and choosing the workspace folder there.

I threw your program into an Eclipse project and ran it. I got a FileNotFoundException. I then opened the test text file on the mapped drive within Eclipse (File > Open) and ran the test program again and got file output.

Let me know if there's anything more I can do.
Comment 6 Kyle Tirak CLA 2010-11-29 10:39:26 EST
For clarity, the Eclipse workspace and the test text file I used when I ran your program from within Eclipse were on different mapped drives.
Comment 7 Szymon Ptaszkiewicz CLA 2011-10-03 07:58:41 EDT
According to comment 0, this problem occurs when using "choose a workspace screen", which means before core.resources is loaded. Moving to Platform/IDE.
Comment 8 Christian Brandstätter CLA 2014-01-30 07:49:05 EST
I might have a similar problem: eclipse doesn't find files on my local network drive. Only after updating the resources manually in the project folders (or at least in one) everything works. I use Win 7; eclipse with statET-addin. 
eclipse Version: Kepler Service Release 1,Build id: 20130919-0819. 
A more detailed desciption of the problem: 
http://www.eclipse.org/forums/index.php/t/612569/
Comment 9 Eclipse Genie CLA 2020-04-08 10:01:26 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.