Weird cfloop problem

4 views
Skip to first unread message

jax

unread,
Apr 10, 2009, 6:01:14 AM4/10/09
to ra...@googlegroups.com
Hi All,

Got this code:

...
  <cfloop from="1" to="#arraylen(cfcatch.tagContext)#" index="i">
...

Railo executes this ok, that is, all following code is run fine and does what it is supposed to do.
However, Railo's console show this stacktrace:

java.lang.IndexOutOfBoundsException: Index: 5, Size: 0
        at java.util.LinkedList.entry(Unknown Source)
        at java.util.LinkedList.get(Unknown Source)
        at railo.runtime.exp.PageExceptionImpl._getTagContext(PageExceptionImpl.java:220)
        at railo.runtime.exp.PageExceptionImpl.getTagContext(PageExceptionImpl.java:190)
        at railo.runtime.exp.CatchBlock.doSpecialItem(CatchBlock.java:145)
        at railo.runtime.exp.CatchBlock.get(CatchBlock.java:112)
        at railo.runtime.util.VariableUtilImpl.get(VariableUtilImpl.java:240)
        at railo.runtime.PageContextImpl.get(PageContextImpl.java:1092)
        at path.to.offending.cfc_cfc$cf.udfCall(C:\pathtoffending.cfc:145)


145 being the <cfloop> line.

The program that throws this error can be accessed either as a component or as a webservice.
Only when accessed as a webservice this error occurs, when accessed as a component all is fine.


Can anyone shed some light on this for me ?

jax

unread,
Apr 16, 2009, 9:31:50 AM4/16/09
to Railo
I guess it remains a mystery then ;-)



On 10 apr, 12:01, jax <real...@gmail.com> wrote:
> Hi All,
>
> Got this code:
>
> ...
> <cfloop from="1" to="#arraylen(cfcatch.tagContext)#" index="i">
> ...
>
> Railo executes this ok, that is, all following code is run fine and does
> what it is supposed to do.
> However, Railo's console show this stacktrace:
>
> java.lang.IndexOutOfBoundsException: Index: 5, Size: 0
> at java.util.LinkedList.entry(Unknown Source)
> at java.util.LinkedList.get(Unknown Source)
> at
> railo.runtime.exp.PageExceptionImpl._getTagContext(PageExceptionImpl.java:220)
> at
> railo.runtime.exp.PageExceptionImpl.getTagContext(PageExceptionImpl.java:190)
> at railo.runtime.exp.CatchBlock.doSpecialItem(CatchBlock.java:145)
> at railo.runtime.exp.CatchBlock.get(CatchBlock.java:112)
> at
> railo.runtime.util.VariableUtilImpl.get(VariableUtilImpl.java:240)
> at railo.runtime.PageContextImpl.get(PageContextImpl.java:1092)
> at path.to.offending.cfc_cfc$cf.udfCall(C:\pathtoffending.cfc:*145*)
Reply all
Reply to author
Forward
0 new messages