Skip to main content

alphaWorks  >  Forums  >  FoCuS  >  developerWorks

How can i get rid of this ArrayIndexOutOfBoundsException?    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is answered.

Permlink Replies: 2 - Pages: 1 - Last Post: Nov 19, 2008 4:21 AM Last Post By: javafreelancer Threads: [ Previous | Next ]
javafreelancer

Posts: 19
Registered: Aug 15, 2005 05:29:28 PM
How can i get rid of this ArrayIndexOutOfBoundsException?
Posted: Oct 25, 2008 09:46:10 PM
 
Click to report abuse...   Click to reply to this thread Reply
hello forum,

win xp pro/sp3; focus version: 1.4.3.2; IBM® Java™ SE Version 6 (from IBM Development Package for Eclipse for 32-bit Windows); Sun JDK 6; ConTest 3.1.0

thanks for making the focus tool available.

i just downloaded focus version 1.4.3.2. i went through the "Viewing Code Coverage Information" tutorial. from the FoCuS\samples\codeCovExample\com_ibm_contest\basicBlocks directory, i opened the basic-block coverage model ("codeCov.model") - which was apparently created from data produced by ConTest.

then, i executed the "Reports->Generate->Hierarchy (Drill Down)" menu option; then pressed, "Create Report"

then focus hurled up the "Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException" stacktrace which i've copied below. unlike in the tutorial that i was following, the "Drill down decision tree" window DID NOT appear. all i got was the stack trace to standard error (see below). i've tried running focus with both, ibm's sdk 6 and with sun's sdk 6. by that, i mean, i edited focus bat; first to:
C:\development\eclipseDevelopmentPackage\ibm_sdk60\bin\java -ea -classpath c:\development\FoCuS\lib\xml4j.jar;c:\development\FoCuS\lib\focus.jar com.ibm.focus.Focus %1

then to:
C:\development\jdk1.6.0_04\bin\java -ea -classpath c:\development\FoCuS\lib\xml4j.jar;c:\development\FoCuS\lib\focus.jar com.ibm.focus.Focus %1


with both jdks, i got the exact same error (see below).

any ideas what's wrong? thanks in advance for your help?

################################################################################

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
 
C:\Documents and Settings\javafreelancer>focus
 
C:\Documents and Settings\javafreelancer>C:\development\eclipseDevelopmentPackage\ibm_sdk60\bin\java -ea -classpath c:\developm
ent\FoCuS\lib\xml4j.jar;c:\development\FoCuS\lib\focus.jar com.ibm.focus.Focus
FoCuS, version: 1.4.3.2
   build: Tue Sep 25 11:43:23 BST 2007
(c) Copyright IBM Corporation (1999, 2007), ALL RIGHTS RESERVED.
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 4
        at com.ibm.focus.DrillDownUtils.countOutputs(DrillDownUtils.java:46)
        at com.ibm.focus.HierarchicalDrillDown.getTreeRec(HierarchicalDrillDown.java:32)
        at com.ibm.focus.HierarchicalDrillDown.getTree(HierarchicalDrillDown.java:26)
        at com.ibm.focus.DrillDownDialog.createReport(DrillDownDialog.java:108)
        at com.ibm.focus.DrillDownDialog.access$000(DrillDownDialog.java:29)
        at com.ibm.focus.DrillDownDialog$1.actionPerformed(DrillDownDialog.java:48)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2008)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2331)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:400)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:255)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:249)
        at java.awt.Component.processMouseEvent(Component.java:6054)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3278)
        at java.awt.Component.processEvent(Component.java:5819)
        at java.awt.Container.processEvent(Container.java:2071)
        at java.awt.Component.dispatchEventImpl(Component.java:4426)
        at java.awt.Container.dispatchEventImpl(Container.java:2129)
        at java.awt.Component.dispatchEvent(Component.java:4256)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4335)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3999)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3929)
        at java.awt.Container.dispatchEventImpl(Container.java:2115)
        at java.awt.Window.dispatchEventImpl(Window.java:2453)
        at java.awt.Component.dispatchEvent(Component.java:4256)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:196)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:186)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:181)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:134)
Yarden

Posts: 38
Registered: Sep 20, 2005 06:05:47 AM
Re: How can i get rid of this ArrayIndexOutOfBoundsException?
Posted: Nov 19, 2008 02:32:36 AM   in response to: javafreelancer in response to: javafreelancer's post
 
Click to report abuse...   Click to reply to this thread Reply
Freelancer,

I hope the problem was solved like the later problem with the interference coverage. Please let me know if not.

Yarden Nir-Buchbinder
Software Testing, Verification and Review Methodologies
IBM Haifa Research Lab
Tel. 972-4-8296010
javafreelancer

Posts: 19
Registered: Aug 15, 2005 05:29:28 PM
Re: How can i get rid of this ArrayIndexOutOfBoundsException?
Posted: Nov 19, 2008 04:21:45 AM   in response to: Yarden in response to: Yarden's post
 
Click to report abuse...   Click to reply to this thread Reply
hello yarden,

thanks for your reply. you were correct. the ArrayIndexOutOfBoundsException issue is resolved by making sure the trace files are not empty.

thanks for your help.

Point your RSS reader here for a feed of the latest messages in all forums