Skip to main content
Participating Frequently
March 16, 2007
Question

Illegal Argumet Exception in Cold Fusion

  • March 16, 2007
  • 1 reply
  • 206 views
I have one district field on the form It is saving to Database fone. Now I am trying to add second district field to DB which is throwing error. Both first and second districts are dropdown lists...


<cfinvoke webservice="#TEApplicationURL#" method="insertApplicationFirst">
<cfinvokeargument name="congressID" value="#val(Form.AppCongDist)#"/>
<cfinvokeargument name="congressID2" value="#val(Form.secondAppCongDist)#"/>
<cfinvokeargument name="role" value="#Session.Role#"/>
</cfinvoke>

The Name of second congressional district is :

<select name="secondAppCongDist">

In CFC file...


<cffunction name="insertApplicationFirst" output="false" access="remote" returntype="void">
<cfargument name="congressID" required="yes" type="numeric"/>
<cfargument name="congressID2" required="yes" type="numeric"/>
<cfargument name="role" required="yes" type="string"/>

<cfquery name="insApplicationCongDist" datasource="#Request.MainDSN#">
INSERT INTO APPLICATION_CONGRESS_DISTRICT(CONGRESS_DISTRICT_ID,CONG_DISTRICT2, APPLICATION_ID)
VALUES (#Arguments.congressID#,#Arguments.congressID2#, <cfloop query="getAppID">#APPLICATION_ID#</cfloop>)
</cfquery>
</cftransaction>

when I am doing this I am getting this error,,,

java.lang.IllegalArgumentException: argument type mismatch

I really appreciate your help on this...

Thanks...
CF bEginner
    This topic has been closed for replies.

    1 reply

    Inspiring
    March 16, 2007
    What is the value of form.secondAppCongDist ?

    What sort of value do you expect to get from that loop in your query? Also, where does query getAppId reside?