0 Replies - 573 Views - Last Post: 30 May 2019 - 05:40 AM Rate Topic: -----

#1 midasxl   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 215
  • Joined: 03-December 08

Help interpreting ColdFusion error

Posted 30 May 2019 - 05:40 AM

Hello and thanks for your time once again.

I have a coldfusion page with a piece of logic that posts data to a method in a .class file.

First I create the class object:

<cfobject type="Java" class="PBIPost" name="postObj" />



Then I set up a collection of Post variables using values from a query:

<cfset PostVar1 = JavaCast("string", #queryRecord0#)>
<cfset PostVar2 = JavaCast("string", #queryRecord1#)>
<cfset PostVar3 = JavaCast("string", #queryRecord2#)>
<cfset PostVar4 = JavaCast("string", #queryRecord3#)>
<cfset PostVar5 = JavaCast("string", #queryRecord4#)>



Then pass the PostVars to the post method in the java class file:

<cfset retVal = jimsObj.jimsPost(PostVar1,PostVar2,PostVar3,PostVar4,PostVar5) />



The error I receive is:

Element 3 is undefined in a Java object of type class coldfusion.runtime.Class&#x24;2.



So is element 3 PostVar3, or PostVar4? Not sure if it starts counting from 0 or from 1.

And I have no idea what coldfusion.runtime.Class&#x24;2. means.

If anyone can shed some light on this error I would greatly appreciate it.

Thanks!!

Is This A Good Question/Topic? 0
  • +

Page 1 of 1