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

Bug 357599

Summary: Array out of bounds if source folder is missing.
Product: z_Archived Reporter: Dimitar Giormov <dimitar.giormov>
Component: LibraAssignee: Dimitar Giormov <dimitar.giormov>
Status: RESOLVED FIXED QA Contact: Kaloyan Raev <kaloyan>
Severity: normal    
Priority: P3 Flags: kaloyan: review+
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: NGPBUG-1468

Description Dimitar Giormov CLA 2011-09-14 03:32:21 EDT
eclipse.buildId=unknown
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64

Error
Wed Sep 14 10:28:26 EEST 2011
Failed while installing OSGi Bundle 4.2.

java.lang.ArrayIndexOutOfBoundsException: 0
	at org.eclipse.libra.facet.OSGiBundleFacetInstallDelegate.getBundleClasspath(OSGiBundleFacetInstallDelegate.java:287)
	at org.eclipse.libra.facet.OSGiBundleFacetInstallDelegate.createBundleProjectDescription(OSGiBundleFacetInstallDelegate.java:134)
	at org.eclipse.libra.facet.OSGiBundleFacetInstallDelegate.doExecute(OSGiBundleFacetInstallDelegate.java:83)
	at org.eclipse.libra.facet.OSGiBundleFacetInstallDelegate.execute(OSGiBundleFacetInstallDelegate.java:76)
	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1477)
	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:441)
	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:1117)
	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$5.run(FacetedProject.java:1099)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChanges(FacetedProject.java:1109)
	at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.commitChanges(FacetedProjectWorkingCopy.java:2020)
	at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$4.run(FacetsPropertyPage.java:232)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$5.run(FacetsPropertyPage.java:246)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Comment 1 Kaloyan Raev CLA 2011-09-14 03:43:04 EDT
Dimitar, could give some steps to reproduce this problem?
Comment 2 Dimitar Giormov CLA 2011-09-26 06:20:31 EDT
1. Create a new faceted java project.
2. Delete the source folder from build properties.
3. Try to convert to OSGi project.

the exception is thrown in the console and it is not logged in the error log.
Comment 3 Dimitar Giormov CLA 2011-10-03 10:57:00 EDT
patch is ready in github:
https://github.com/dgiormov/libra_patches2/commit/7e99e00df23217da80d80ae65714750165aa9459
Comment 4 Kaloyan Raev CLA 2011-10-04 09:11:53 EDT
Patch looks good to me. 
Please push it to both 'master' and 'indigo' branches.
Comment 5 Dimitar Giormov CLA 2011-10-04 11:55:17 EDT
pushed in master and indigo