Author Topic: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0  (Read 14251 times)

survivant

  • Newbie
  • *
  • Posts: 12
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« on: June 18, 2007, 06:55:41 AM »
I'm using the latest version of ADPJ and MaintainJ with Eclipse 3.3RC3

I didn't modify anything in MyAspectJProject.. except change false to true to get a popup to save the trace.  It's a not gui application and it's J2SE.

Exception in thread "com.bridge.feed.toolkit.BFToolkitDispatcher3" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
   at java.util.ArrayList.RangeCheck(ArrayList.java:547)
   at java.util.ArrayList.get(ArrayList.java:322)
   at com.maintainj.aspect.JoinPointList.get(JoinPointList.java:46)
   at com.bridge.feed.toolkit.BFQueue.get_aroundBody21$advice(BFQueue.java:191)
   at com.bridge.feed.toolkit.BFQueue.get(BFQueue.java:1)
   at com.bridge.feed.toolkit.BFToolkitDispatcher.run_aroundBody4(BFToolkitDispatcher.java:31)
   at com.bridge.feed.toolkit.BFToolkitDispatcher.run_aroundBody5$advice(BFToolkitDispatcher.java:251)
   at com.bridge.feed.toolkit.BFToolkitDispatcher.run(BFToolkitDispatcher.java:1)

Choudary Kothapalli

  • Administrator
  • Full Member
  • *****
  • Posts: 174
    • Email
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #1 on: June 18, 2007, 07:31:40 AM »
survivant,

Could you tell me at which point you are getting this exception? While running the application or when you click the 'Stop' button?

Regards,
Choudary Kothapalli.

survivant

  • Newbie
  • *
  • Posts: 12
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #2 on: June 18, 2007, 07:38:35 AM »
when running the application.  but the application continue to work.

survivant

  • Newbie
  • *
  • Posts: 12
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #3 on: June 18, 2007, 08:46:41 AM »
oups.. It's when I stop the trace.

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 29, Size: 0
   at java.util.ArrayList.RangeCheck(ArrayList.java:547)
   at java.util.ArrayList.get(ArrayList.java:322)
   at com.maintainj.aspect.JoinPointList.get(JoinPointList.java:46)
   at bkr.apps.gateway.quotegw.test.QuoteGwTracing.traceEntry_aroundBody5$advice(QuoteGwTracing.aj:191)
   at bkr.apps.gateway.quotegw.test.QuoteGwTracing.traceEntry(QuoteGwTracing.aj:1)
   at bkr.apps.gateway.quotegw.test.QuoteGwTracing.ajc$before$bkr_apps_gateway_quotegw_test_QuoteGwTracing$3$4c40d6d7(QuoteGwTracing.aj:89)
   at bkr.apps.gateway.quotegw.QuoteConnManager.prepConnections_aroundBody8(QuoteConnManager.java:146)
   at bkr.apps.gateway.quotegw.QuoteConnManager.prepConnections_aroundBody9$advice(QuoteConnManager.java:251)
   at bkr.apps.gateway.quotegw.QuoteConnManager.prepConnections(QuoteConnManager.java:1)
   at bkr.apps.gateway.quotegw.QuoteManager.start_aroundBody38(QuoteManager.java:611)
   at bkr.apps.gateway.quotegw.QuoteManager.start_aroundBody39$advice(QuoteManager.java:251)
   at bkr.apps.gateway.quotegw.QuoteManager.start(QuoteManager.java:1)
   at bkr.apps.gateway.quotegw.QuoteGw.init_aroundBody4(QuoteGw.java:222)
   at bkr.apps.gateway.quotegw.QuoteGw.init_aroundBody5$advice(QuoteGw.java:251)
   at bkr.apps.gateway.quotegw.QuoteGw.init(QuoteGw.java:1)
   at bkr.apps.gateway.quotegw.QuoteGw.main_aroundBody8(QuoteGw.java:254)
   at bkr.apps.gateway.quotegw.QuoteGw.main_aroundBody9$advice(QuoteGw.java:251)
   at bkr.apps.gateway.quotegw.QuoteGw.main_aroundBody10(QuoteGw.java:1)
   at bkr.apps.gateway.quotegw.QuoteGw.main_aroundBody11$advice(QuoteGw.java:317)
   at bkr.apps.gateway.quotegw.QuoteGw.main(QuoteGw.java:1)

Choudary Kothapalli

  • Administrator
  • Full Member
  • *****
  • Posts: 174
    • Email
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #4 on: June 18, 2007, 09:00:53 AM »
survivant,

The stack trace suggests that it is while you are running the application and not when you click the 'Stop' button. Could you repeat the process and confirm at which point you see the trace? If it is while running the application, it looks like a defect.

Are you able to generate the trace file for any use cases or are you seeing this exception for every use case?

Regards,
Choudary Kothapalli.

Choudary Kothapalli

  • Administrator
  • Full Member
  • *****
  • Posts: 174
    • Email
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #5 on: June 18, 2007, 09:47:12 AM »
survivant,

Could you replace <<EclipseRoot>>/plugins/com.maintainj.inst.wizard_1.0.3/MaintainJAspect.jar with the attached MaintainJAspect.jar and check if you still get the same problem?

You need to restart Eclipse and re-run the Instrumentation wizard to generate the aspect project.

Thanks,
Choudary Kothapalli.

survivant

  • Newbie
  • *
  • Posts: 12
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #6 on: June 18, 2007, 10:49:10 AM »
solve the problem.

thanks

bruce

  • Newbie
  • *
  • Posts: 6
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #7 on: September 24, 2007, 10:44:36 AM »
Hi Choudary
I am now seeing the same issue as survivant.

Is that fix you posted on this forum thread back in June readily available? I clicked on the link but it looks like the jar file has been moved? I couldn't get hold of it anyway.

Is there any chance of getting this fix?

many thanks
Bruce

Choudary Kothapalli

  • Administrator
  • Full Member
  • *****
  • Posts: 174
    • Email
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #8 on: September 24, 2007, 11:32:25 AM »
Bruce,

That problem was fixed long ago, unless you are still using the old version of MaintainJ. Are you getting the exact same exception as survivant was getting?

Regards,
Choudary.

bruce

  • Newbie
  • *
  • Posts: 6
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #9 on: September 24, 2007, 11:42:52 AM »
Hi Choudary
Looks like the same to me. I've obscured our company name in the package names below. I'm told that is wise as they sometimes dont want things disclosed in public forums. That shouldn't detract from the issue though.

thanks in advance for your help

Bruce

INFO [Thread-0] com.xxxxxxxx.xxx.jam.engine.EngineAccessImpl.config(EngineAccessImpl.java:102) 2007-09-24 16:31:59,967 - config failed:
java.lang.IndexOutOfBoundsException: Index: 37, Size: 1
    at java.util.ArrayList.RangeCheck(Unknown Source)
    at java.util.ArrayList.get(Unknown Source)
    at com.maintainj.aspect.JoinPointList.get(JoinPointList.java:46)
    at com.xxxxxxxx.jam.curves.xxxLatencyReport.initLat_aroundBody9$advice(xxxLatencyReport.java:175)
    at com.xxxxxxxx.jam.curves.xxxLatencyReport.initLat(xxxLatencyReport.java:1)
    at com.xxxxxxxx.jam.curves.CADShort.xxxCADShortZeroCurveCalc.config_aroundBody6(xxxCADShortZeroCurveCalc.java:69)
    at com.xxxxxxxx.jam.curves.CADShort.xxxCADShortZeroCurveCalc.config_aroundBody7$advice(xxxCADShortZeroCurveCalc.java:142)^M
    at com.xxxxxxxx.jam.curves.CADShort.xxxCADShortZeroCurveCalc.config(xxxCADShortZeroCurveCalc.java:1)
    at com.xxxxxxxx.xxx.jam.engine.EngineAccessImpl.config(EngineAccessImpl.java:93)
    at com.xxxxxxxx.xxx.jam.adaptor.AMQTalk.processMessage(AMQTalk.java:747)
    at com.xxxxxxxx.xxx.jam.adaptor.AMQTalk.decodeMessage(AMQTalk.java:619)
    at com.xxxxxxxx.xxx.jam.adaptor.DecodeTask.run(DecodeTask.java:39)
    at com.xxxxxxxx.xxx.jam.adaptor.MessageFilter.run(MessageFilter.java:41)
    at java.lang.Thread.run(Unknown Source)

INFO [Thread-0] com.xxxxxxxx.xxx.jam.engine.EngineAccessImpl.calc(EngineAccessImpl.java:142) 2007-09-24 16:31:59,999 - calc failed:
java.lang.IndexOutOfBoundsException: Index: 37, Size: 1
    at java.util.ArrayList.RangeCheck(Unknown Source)
    at java.util.ArrayList.get(Unknown Source)
    at com.maintainj.aspect.JoinPointList.get(JoinPointList.java:46)
    at com.xxxxxxxx.jam.curves.CADShort.xxxCADShortZeroCurveCalc.calc_aroundBody9$advice(xxxCADShortZeroCurveCalc.java:175)
    at com.xxxxxxxx.jam.curves.CADShort.xxxCADShortZeroCurveCalc.calc(xxxCADShortZeroCurveCalc.java:1)
    at com.xxxxxxxx.xxx.jam.engine.EngineAccessImpl.calc(EngineAccessImpl.java:133)
    at com.xxxxxxxx.xxx.jam.adaptor.AMQTalk.processMessage(AMQTalk.java:773)
    at com.xxxxxxxx.xxx.jam.adaptor.AMQTalk.decodeMessage(AMQTalk.java:619)
    at com.xxxxxxxx.xxx.jam.adaptor.DecodeTask.run(DecodeTask.java:39)
    at com.xxxxxxxx.xxx.jam.adaptor.MessageFilter.run(MessageFilter.java:41)
    at java.lang.Thread.run(Unknown Source)

Choudary Kothapalli

  • Administrator
  • Full Member
  • *****
  • Posts: 174
    • Email
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #10 on: September 24, 2007, 11:46:53 AM »
Yes, it is a good thing to remove the company names.

Just to confirm, are you using the latest version of MaintainJ? Could you check it and tell me?

Choudary.

bruce

  • Newbie
  • *
  • Posts: 6
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #11 on: September 25, 2007, 03:53:32 AM »
Hi Choudary
I'm using 1.3. The checksums of the various jars I'm using are below.

Also I'm using aspectjrt.jar 1.5.4.200705211336.

I got these jars yesterday via your 'MaintainJ 1.3.zip' link in section 3 of the installation guide at http://www.maintainj.com/userGuide.jsp?param=install. Do i have old jars here? The timestamps look pretty recent?

Any ideas?
thanks
Bruce

$ ls -l ./Program\ Files/eclipse/plugins/com.maintainj.umlDiagram_1.3/MaintainJAspect.jar
-rwx------+ 1 V074015 ???????? 18600 Sep  1 12:09 ./Program Files/eclipse/plugins/com.maintainj.umlDiagram_1.3/MaintainJAspect.jar

$ cksum ./Program\ Files/eclipse/plugins/com.maintainj.umlDiagram_1.3/MaintainJAspect.jar
615600830 18600 ./Program Files/eclipse/plugins/com.maintainj.umlDiagram_1.3/MaintainJAspect.jar

$ ls -l Program\ Files/eclipse/plugins/com.maintainj.inst.wizard_1.3/MaintainJWizard.jar
-rwx------+ 1 V074015 ???????? 98164 Sep  1 12:09 Program Files/eclipse/plugins/com.maintainj.inst.wizard_1.3/MaintainJWizard.jar

$ cksum Program\ Files/eclipse/plugins/com.maintainj.inst.wizard_1.3/MaintainJWizard.jar
249030185 98164 Program Files/eclipse/plugins/com.maintainj.inst.wizard_1.3/MaintainJWizard.jar

$ ls -l Program\ Files/eclipse/plugins/com.maintainj.umlDiagram_1.3/MaintainJEditor.jar
-rwx------+ 1 V074015 ???????? 176457 Sep  1 12:09 Program Files/eclipse/plugins/com.maintainj.umlDiagram_1.3/MaintainJEditor.jar

$ cksum Program\ Files/eclipse/plugins/com.maintainj.umlDiagram_1.3/MaintainJEditor.jar
3430364447 176457 Program Files/eclipse/plugins/com.maintainj.umlDiagram_1.3/MaintainJEditor.jar

$ ls -l ./Program\ Files/eclipse/plugins/org.aspectj.runtime_1.5.4.200705211336/aspectjrt.jar
-rwx------+ 1 V074015 ???????? 114999 Sep 19 15:18 ./Program Files/eclipse/plugins/org.aspectj.runtime_1.5.4.200705211336/aspectjrt.jar

$ cksum ./Program\ Files/eclipse/plugins/org.aspectj.runtime_1.5.4.200705211336/aspectjrt.jar
3042801281 114999 ./Program Files/eclipse/plugins/org.aspectj.runtime_1.5.4.200705211336/aspectjrt.jar

Choudary Kothapalli

  • Administrator
  • Full Member
  • *****
  • Posts: 174
    • Email
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #12 on: September 25, 2007, 05:05:42 AM »
Yes, they look recent. Let me chck if there could be any other problem. Give me a couple of hours. Could you email me the com.maintainj.inst.wizard_1.3/MaintainJAspect.jar file?

Regards,
Choudary.

bruce

  • Newbie
  • *
  • Posts: 6
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #13 on: September 25, 2007, 05:35:12 AM »
file is on its way

thanks

Choudary Kothapalli

  • Administrator
  • Full Member
  • *****
  • Posts: 174
    • Email
Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
« Reply #14 on: September 29, 2007, 11:23:02 AM »
This problem has been solved for Bruce with a fix to MaintainJAspect.jar.

This condition arises when a use case is stopped before all calls have returned. If anyone else gets this problem, replace the eclipse/plugins/com.maintainj.inst.wizard_x.x.x/MaintainJAspect.jar with this MaintainJAspect.jar. Make sure that your workspace is rebuilt before trying it again.

Regards,
Choudary.
« Last Edit: September 29, 2007, 09:30:34 PM by Choudary Kothapalli »