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

Bug 227686

Summary: [ui] NPE when refreshing repo added as a zip file
Product: [Eclipse Project] Equinox Reporter: Cheng-Yee Lin <clin>
Component: p2Assignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: clin, dstevens, simon_kaegi
Version: 3.4   
Target Milestone: 3.4 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Error message none

Description Cheng-Yee Lin CLA 2008-04-17 20:18:00 EDT
Created attachment 96530 [details]
Error message

Build: eclipse-SDK-I20080415-1646-win32.zip

. Bring up the Software Updates and Add-ons dialog, switch to the Available Software tab.
. Click on the Add Site... button.
. In the Add Site dialog, click on the Archive... button.
. In the Repository Archive dialog, specify a zip file (e.g. emf-runtime-2.4.0M6.zip), and click on the Open button.
. Back in the Add Site dialog, click on the OK button.
. Back in the Software Updates and Add-ons dialog.

=> Cannot expand the entry corresponding to the specified zip file (e.g. the jar:file:C:\emf-runtime-2.4.0M6.zip entry).

. Now, click on the Refresh button.

=> An error dialog pops up, as in the attachment.

. Click on the OK button for the error dialog.

=> That entry goes away.
Comment 1 Susan McCourt CLA 2008-04-18 10:11:12 EDT
- when this happens, are you viewing the available software by name, category, or site?  (Does it happen in all cases?)
- Can you please provide a link to the zip file question in attach it here if it is not available for download?  
Comment 2 Cheng-Yee Lin CLA 2008-04-18 11:29:21 EDT
It happens in all cases (by site, category or name).  (Note:  I did not see the arrow for the dropdown list, until you asked me about this.  It would be great if the arrow/dropdown list can be made more visible, so the user would know.  In fact, the dialog may want to show the current selection (e.g. by site) in a dropdown combo box, so it would be more apparent to the user what the current selection is, and what other possible selections are there.  That may be a different bug.)

For the zip file used here, I downloaded it from the following link, and stored on my local drive:

  http://www.eclipse.org/downloads/download.php?file=/modeling/emf/emf/downloads/drops/2.4.0/S200804012208/emf-runtime-2.4.0M6.zip

(If I unzip the file into a directory, and use the Local... button to add it as a local site, the problem goes away.)

Comment 3 Susan McCourt CLA 2008-04-18 11:44:57 EDT
I opened bug #227789 for the suggestion to make the view menu more obvious.
Will look into the other problem.

Marking M7 so it can at least be investigated, I'm not sure if this is a UI or underlying problem.
Comment 4 Susan McCourt CLA 2008-04-24 01:14:29 EDT
The NPE was caused by some poor exception handling in the UI code.  This has been fixed in HEAD >20080423.

Turns out the NPE was masking the real problem, a "repository not found" ProvisionException.  We are no longer "auto-unzipping" files in the UI.  See bug #224933.  So when the refresh occurred, we tried to refresh a URL not recognized by any repository factory.

I'm marking this bug fixed because the NPE is gone and you get the real error now.  The fact that we are no longer unzipping the files for the users is covered in bug #224933.