This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 130300 - StringIndexOutOfBoundsException when opening web project integrated with Ivy
Summary: StringIndexOutOfBoundsException when opening web project integrated with Ivy
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker with 1 vote (vote)
Assignee: David Konecny
URL:
Keywords:
: 137250 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-17 15:57 UTC by jodeen
Modified: 2009-01-10 20:34 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Messages.log (124.22 KB, text/plain)
2008-03-17 15:59 UTC, jodeen
Details
Simple test project (780.87 KB, application/octet-stream)
2008-03-28 20:05 UTC, jodeen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jodeen 2008-03-17 15:57:38 UTC
When opening a web-project that is configured to use ivy (using http://wiki.netbeans.org/FaqIvy), i get a
StringIndexOutOfBoundsException: String index out of range: -1 exception.

Under netbeans 6.0 I was able to open the project, but would get an exception when going to the libraries panel in the
project properties.

Normal java library projects work without any issues.
Comment 1 jodeen 2008-03-17 15:59:06 UTC
Created attachment 58497 [details]
Messages.log
Comment 2 David Konecny 2008-03-28 00:04:47 UTC
I tried it and it works fine to me. I guess it may depend on jars being used? Would it be possible to attach your
project? I mean content of nbproject folder and ivy.xml. Thanks, -D
Comment 3 jodeen 2008-03-28 20:05:56 UTC
Created attachment 59311 [details]
Simple test project
Comment 4 jodeen 2008-03-28 20:07:22 UTC
Attached a zip of a project folder that causes the error for me.
I've replicated this with both 6.1beta1 and the daily build of 6.1 from Mar 25.
Comment 5 David Konecny 2008-03-31 07:36:13 UTC
Thanks. The problem is in org.netbeans.modules.j2ee.common.project.classpath.ClassPathSupport.Item.getSourceReference()
which assumes that any property name always starts with "${file.reference.".

Short term workaround: rename in project.properties your 'ivy.classpath' to 'ivy.classpathX' which makes length of
property ("${ivy.classpathX}") longer than 16 and will pass above mentioned broken algorithm.
Comment 6 David Konecny 2008-04-01 00:02:50 UTC
I can see that's been fixed for J2SE project. I will fix in web then.
Comment 7 David Konecny 2008-04-01 02:55:49 UTC
Ported bug fix of issue 127164 to web. Be aware that this will not get into 6.1 final release as it is too late.
Candidate for patch release.
http://hg.netbeans.org/main?cmd=changeset;node=2ec03984d191
Comment 8 David Konecny 2008-04-01 03:25:22 UTC
.
Comment 9 David Konecny 2008-06-17 23:14:36 UTC
*** Issue 137250 has been marked as a duplicate of this issue. ***
Comment 10 pgebauer 2008-07-29 22:06:39 UTC
As the nomination process goes forward with NetBeans 6.1 Patch 3 and beyond, low priority defects from P3 to P5 should
include a justification and a safety assessment when nominated for patch inclusion. Could QE provide that info?
Comment 11 rbalada 2008-08-06 15:59:00 UTC
This issue did not meet the criteria for inclusion in NetBeans 6.1 Patch 3.
Comment 12 rbalada 2008-10-08 16:41:43 UTC
Erasing from Sustaining team's radar.
Comment 13 Exceptions Reporter 2008-10-14 15:18:29 UTC
Reopening - reproduced in NetBeans IDE 6.1 (Build 200805300101)
http://statistics.netbeans.org/exceptions/detail.do?id=127809
Comment 14 Jindrich Sedek 2008-10-14 15:46:36 UTC
wrongly reopen - old build, I'll look at the bug in reporter reopening