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

Bug 351752

Summary: Attempting to import a malformed EJB jar with Archive File wizard causes StackOverflowError
Product: [Eclipse Project] Platform Reporter: Diego Sahagun <diegosr>
Component: IDEAssignee: Dani Megert <daniel_megert>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, pwebster, remy.suen
Version: 3.2Flags: emoffatt: review+
Target Milestone: 3.7.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 354487, 354489    
Attachments:
Description Flags
jar that causes the error
none
Stack trace of the error
none
Fix none

Description Diego Sahagun CLA 2011-07-11 16:39:38 EDT
Build Identifier: M20110210-1200

I'm aware that's not the proper wizard to import an EJB project, but I consider this case is worth to investigate.

Reproducible: Always

Steps to Reproduce:
1. File -> Import -> General -> Archive File 
2. Browse for the file "ConverterEJB3.jar" (Attached here)
3. Click Open
Comment 1 Diego Sahagun CLA 2011-07-11 16:42:09 EDT
Created attachment 199446 [details]
jar that causes the error
Comment 2 Diego Sahagun CLA 2011-07-11 16:43:13 EDT
Created attachment 199447 [details]
Stack trace of the error
Comment 3 Dani Megert CLA 2011-07-12 03:35:43 EDT
A Stackoverflow is not nice.
Comment 4 Dani Megert CLA 2011-07-12 03:39:07 EDT
Created attachment 199470 [details]
Fix
Comment 5 Dani Megert CLA 2011-07-12 11:28:14 EDT
Could also add a test case to ImportArchiveOperationTest.
Comment 6 Dani Megert CLA 2011-08-09 10:01:45 EDT
Eric, OK for 3.7.1?
Comment 7 Eric Moffatt CLA 2011-08-09 13:36:51 EDT
Looks safe enough...

Committed in >20110809. Applied the patch.

Dani, could you do the VERIFY ?
Comment 8 Remy Suen CLA 2011-08-09 13:38:02 EDT
(In reply to comment #7)
> Looks safe enough...
> 
> Committed in >20110809. Applied the patch.

Do we need a separate bug for tracking this in 3.8 and 4.2?
Comment 9 Dani Megert CLA 2011-08-10 02:35:09 EDT
> Do we need a separate bug for tracking this in 3.8 and 4.2?
And 4.1.1. Yes, I think Platform UI does it like this. In JDT we only use a single bug and set the lowest target as it is our common practice to also put the fix in all newer streams.

>Dani, could you do the VERIFY ?
Will do.
Comment 10 Eric Moffatt CLA 2011-08-10 09:45:33 EDT
Dani, I've only made the changes in the R7_maintenance stream...are you going to do 3.8 ? Apparently we also have to explicitly get the change into the R4_development stream as well...I think I need a lesson in 'cherry picking' (that's GIT talk for moving a commit from one branch to another).
Comment 11 Dani Megert CLA 2011-08-10 09:53:41 EDT
(In reply to comment #10)
> Dani, I've only made the changes in the R7_maintenance stream...are you going
> to do 3.8 ?
It would be great if you could do it, as I'm not yet set-up with Git. We should do it now so that all streams are in sync.
Comment 12 Dani Megert CLA 2011-08-11 02:58:58 EDT
Verified for 3.7.1. in M20110810-0800.

I'm reopening this bug until we either have separate bugs for 3.8, 4.1.1 and 4.2 or we have comments in this bug confirming the commit into those branches.
Comment 13 Remy Suen CLA 2011-08-11 09:16:10 EDT
(In reply to comment #12)
> I'm reopening this bug until we either have separate bugs for 3.8, 4.1.1 and
> 4.2 or we have comments in this bug confirming the commit into those branches.

I've opened bug 354487 to track the one for 3.8 and bug 354489 for 4.x. We haven't split 4.1.1 and 4.2...yet.
Comment 14 Remy Suen CLA 2011-08-11 09:16:32 EDT
(In reply to comment #12)
> Verified for 3.7.1. in M20110810-0800.

Resetting to VERIFIED. Thanks for verifying the fix, Dani.