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

Bug 323304

Summary: Adding servletbridge fails with StringIndexOutOfBoundsException
Product: z_Archived Reporter: Michal Tkacz <Michal.Tkacz>
Component: LibraAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: holger.staudacher
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Michal Tkacz CLA 2010-08-21 05:11:12 EDT
Whether I try to create new WAR product file or "add required" library to the list of libraries, following exception is thrown:

java.lang.StringIndexOutOfBoundsException: String index out of range: -34
	at java.lang.String.substring(String.java:1937)
	at org.eclipse.rap.warproducts.core.WARProductUtil.addServletBridgeFromTarget(WARProductUtil.java:52)

From what I can see in the source code, this is because my requiredBundles folder is outside of my regular target platform location, as returned by TargetPlatform.getLocation().
Comment 1 Holger Staudacher CLA 2010-08-21 05:29:22 EDT
Hi Michal,
thanks for reporting. Does this mean you just added the folder to your target definition instead of copying the bundles into your target folder? I need to know exactly what you have done with the bundles in the requiredBundles.zip to reproduce the error. Thanks in advance.

Regards Holger
Comment 2 Michal Tkacz CLA 2010-08-21 05:37:51 EDT
That's right, my target definition consists of several software sites and the requiredBundles directory on my local disk. Eclipse stores bundles from the software sites in the .metadata/.plugins/org.eclipse.pde.core/bundle_pool/plugins folder in my workspace which is not where I have the requiredBundles folder.
Comment 3 Holger Staudacher CLA 2010-08-21 05:49:35 EDT
Ok, thanks for the information. I will take a close look at it during the next week.

Regards Holger
Comment 4 Holger Staudacher CLA 2011-01-27 07:13:44 EST
Fixed in CVS HEAD.