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 130495 - indexOutOfBounds when flushing caches
Summary: indexOutOfBounds when flushing caches
Status: CLOSED WONTFIX
Alias: None
Product: obsolete
Classification: Unclassified
Component: archivesupport (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker with 1 vote (vote)
Assignee: issues@obsolete
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-19 10:59 UTC by pepeio
Modified: 2011-11-28 11:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pepeio 2008-03-19 10:59:13 UTC
This is in a platform based application, happens when starting.

Exception in thread "Flushing caches" java.lang.ArrayIndexOutOfBoundsException: 1
	at org.netbeans.Archive.flushCaches(Archive.java:235)
	at org.netbeans.Stamps$Store.store(Stamps.java:467)
	at org.netbeans.Stamps$Worker.run(Stamps.java:629)

I have no idea of the cause for this exception.
Comment 1 azda 2009-04-07 15:55:25 UTC
I have the same problem. We have this problem after porting our application from NB platform 6 to 6.5

Have some additional information about archive support in NB platform or some solution for fix this problem?
Comment 2 azda 2009-04-14 08:41:44 UTC
I have some additional information: this exception throws, because to the jar archive puts incorrect resources. In my
case it happens after trying to initialize in my code Spring's ClassPathXmlApplicationContext(DEFAULT_APPLICATION_XML)
where DEFAULT_APPLICATION_XML declared as

private String[] DEFAULT_APPLICATION_XML = {"classpath*:application.xml", "classpath*:application*.xml"};

Spring tries to get from classpath all *.xml from classpath. In some moment program enter to method
Archive.getData(JarSource source, String name) with parameters, where name="". In result of with request we have srcId
like a "jar:file:/D:/DEVELOPMENT/TRUNK/dist/platform9/core/patches/org-openide-filesystems-sie.jar!/". This data puts to
'requests'.

When Archive.flushCaches(...) called, program gets incorrect string from 'requests' map, like
"jar:file:/D:/DEVELOPMENT/TRUNK/dist/platform9/core/patches/org-openide-filesystems-sie.jar!/". After splitting string
'parts' array contains only one element and as result - exception will be throw in line 235:

byte[] data = src.resource(parts[1]);

How correct fix this? I make some "fix" and build my own boot.jar, but I think it's not good idea.
Comment 3 rehevkor5 2011-05-05 20:12:45 UTC
Just got this exception in a 6.9.1 application.
Comment 4 Jan Chalupa 2011-11-28 09:02:50 UTC
Obsolete issue. Closing.
Comment 5 Marian Mirilovic 2011-11-28 11:37:51 UTC
v/c