Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323304 - Adding servletbridge fails with StringIndexOutOfBoundsException
Summary: Adding servletbridge fails with StringIndexOutOfBoundsException
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Libra (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-21 05:11 EDT by Michal Tkacz CLA
Modified: 2022-02-24 11:24 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.