5 Replies Latest reply on Sep 16, 2015 2:02 PM by Imran Chaudhary_857

    ColdFusion 8 Migration ColdFusion 11

    Imran Chaudhary_857

      Currently getting the following error. 

       

      The START_DATE argument passed to the insertApplication function is not of type date.

       

       

      If the component name is specified as a type of this argument, it is possible that either a definition file for the component cannot be found or is not accessible.

       

      The error occurred in D:/web-sites/Web/poolDischarge/components/poolDischarge.cfc: line 54

      52 : <cfargument name="Mailing_State" type="string" default="#arguments.discharge_state#">

      53 : <cfargument name="Mailing_Zip" type="string" default="#arguments.discharge_zip#">

      54 : <cfargument name="Pro_Discharge" type="boolean" default="0" required="yes">

      55 : <cfargument name="Maintenance_Company_ID" type="numeric" required="yes">

      56 : <cfargument name="Start_Date" type="date" required="yes">

      Resources:

      Check the ColdFusion documentation to verify that you are using the correct syntax.

      Search the Knowledge Base to find a solution to your problem.

      Browser   Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36

      Remote Address   192.168.21.59

      Referrer   http://192.168.25.130/pooldischarge/index.cfm

      Date/Time   10-Sep-15 03:07 PM

      Stack Trace

      at cfpoolDischarge2ecfc1389536174$funcINSERTAPPLICATION.runFunction(D:/web-sites/Web/poolDis charge/components/poolDischarge.cfc:54) at cfindex2ecfm1834540527.runPage(D:/web-sites/Web/poolDischarge/index.cfm:58)

       

       

      coldfusion.runtime.UDFMethod$InvalidArgumentTypeException: The START_DATE argument passed to the insertApplication function is not of type date.

        at coldfusion.runtime.UDFMethod._validateArg(UDFMethod.java:1105)

        at coldfusion.runtime.UDFMethod._validateArg(UDFMethod.java:1118)

        at cfpoolDischarge2ecfc1389536174$funcINSERTAPPLICATION.runFunction(D:\web-sites\Web\poolDis charge\components\poolDischarge.cfc:54)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)

        at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)

        at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)

        at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533)

        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648)

        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457)

        at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424)

        at cfindex2ecfm1834540527.runPage(D:\web-sites\Web\poolDischarge\index.cfm:58)

        at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:246)

        at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:736)

        at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572)

        at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)

        at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)

        at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:487)

        at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42)

        at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

        at coldfusion.filter.PathFilter.invoke(PathFilter.java:142)

        at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)

        at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:78)

        at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)

        at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

        at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)

        at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

        at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

        at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)

        at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:151)

        at coldfusion.CfmServlet.service(CfmServlet.java:219)

        at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:303)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

        at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )

        at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:241)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)

        at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:199)

        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.jav a:607)

        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        at java.lang.Thread.run(Thread.java:745)

        • 1. Re: ColdFusion 8 Migration ColdFusion 11
          nic_tunney Adobe Community Professional

          We might need to see more code.  Are you sure you are passing in enough arguments, and that the last argument for start_date is indeed a valid date?  If you are sure you are passing in a value you can change the type to "Any" and dump out arguments to see what is being sent.

          • 2. Re: ColdFusion 8 Migration ColdFusion 11
            WolfShade Level 4

            The error says that line 54 (Pro_Discharge) is the culprit, but Start_Date is line 56.  Are you sure you're passing the correct number of arguments to the function?  Seems like something is not adding up.

             

            Are you passing the values alone in proper order?  Or are you naming each value passed?

             

            V/r,

             

            ^_^

            • 3. Re: ColdFusion 8 Migration ColdFusion 11
              Imran Chaudhary_857 Level 1

              Here is the code:

              <cffunction name="insertApplication" returntype="numeric">

                <cfargument name="Approval_Status" type="numeric" default="#this.APPROVAL_STATUS_EVALUATION#">

                <cfargument name="Approval_Date" default="">

                <cfargument name="Delivery_Method" type="numeric" default="0">

                <cfargument name="Certified_Mail_Number" type="string" default="">

                <cfargument name="Inspector_Name" type="string" default="">

                <cfargument name="Inspector_Phone" type="string" default="">

                <cfargument name="Discharge_Address_Entered" type="string" required="Yes">

                <cfargument name="Discharge_Address_Number" type="numeric" default="-1">

                <cfargument name="Discharge_Address_Street_Name" type="string">

                <cfargument name="Discharge_Address2" type="string" default="">

                <cfargument name="Discharge_City" type="string" required="yes">

                <cfargument name="Discharge_State" type="string" required="yes">

                <cfargument name="Discharge_Zip" type="string" required="yes">

                <cfargument name="Owner_First_Name" type="string" required="yes">

                <cfargument name="Owner_Last_Name" type="string" required="yes">

                <cfargument name="Owner_Phone" type="string" required="yes">

                <cfargument name="Owner_Fax" type="string" default="">

                <cfargument name="Owner_Email" type="string" default="">

                <cfargument name="mailingSame" type="boolean" default="true">

                <cfargument name="Mailing_Address1" type="string" default="#arguments.discharge_address_entered#">

                <cfargument name="Mailing_Address2" type="string" default="#arguments.discharge_address2#">

                <cfargument name="Mailing_City" type="string" default="#arguments.discharge_city#">

                <cfargument name="Mailing_State" type="string" default="#arguments.discharge_state#">

                <cfargument name="Mailing_Zip" type="string" default="#arguments.discharge_zip#">

                <cfargument name="Pro_Discharge" type="boolean" default="0" required="yes">

                <cfargument name="Maintenance_Company_ID" type="numeric" required="yes">

                <cfargument name="Start_Date" type="date" required="yes">

                <cfargument name="End_Date" type="date" required="no">

                <cfargument name="altDischarge" type="numeric" default="0">

                <cfargument name="Discharge_Point" type="string" required="yes">

                <cfargument name="Volume" type="numeric" required="yes">

                <cfargument name="Requested_Flow_Rate" type="numeric" default="#this.DEFAULT_FLOW_RATE#">

                <cfargument name="Is_Saltwater" type="boolean" default="false" required="yes">

                <cfargument name="Has_Solids" type="boolean" default="false" required="yes">

                <cfargument name="Solids_Treatment" type="string" default="">

                <cfargument name="Has_Copper" type="boolean" default="false" required="yes">

                <cfargument name="Copper_Treatment" type="string" default="">

                <cfargument name="Water_pH" type="numeric" default="0" required="yes">

                <cfargument name="pH_Treatment" type="string" default="">

                <cfargument name="created_by" type="string" default="User">

                <cfargument name="Comments" type="string" default="">

                <cfargument name="Preferred_Delivery_Method" type="string" default="">

               

                <cfquery name="doInsert" datasource="#application.dsn#">

                 insert into Applications (

                  Approval_Status,

                  Approval_Date,

                  Permit_Number,

                  Delivery_Method,

                  Certified_Mail_Number,

                  Inspector_Name,

                  Inspector_Phone,

                  Discharge_Address_Entered,

                  Discharge_Address_Number,

                  Discharge_Address_Street_Name,

                  Discharge_Address2,

                  Discharge_City,

                  Discharge_State,

                  Discharge_Zip,

                  Owner_First_Name,

                  Owner_Last_Name,

                  Owner_Phone,

                  Owner_Fax,

                  Owner_Email,

                  MailingSame,

                  Mailing_Address1,

                  Mailing_Address2,

                  Mailing_City,

                  Mailing_State,

                  Mailing_Zip,

                  Pro_Discharge,

                  Maintenance_Company_ID,

                  Start_Date,

                  End_Date,

                  altDischarge,

                  Discharge_Point,

                  Volume,

                  Requested_Flow_Rate,

                  Is_Saltwater,

                  Has_Solids,

                  Solids_Treatment,

                  Has_Copper,

                  Copper_Treatment,

                  Water_pH,

                  pH_Treatment,

                  created_by,

                  Comments,

                  Preferred_Delivery_Method

                 ) values (

                  <cfqueryparam value="#arguments.Approval_Status#" cfsqltype="CF_SQL_NUMERIC">,

                  <cfif isDate(arguments.Approval_Date)>

                   <cfqueryparam value="#arguments.Approval_Date#" cfsqltype="CF_SQL_TIMESTAMP">,

                  <cfelse>

                   null,

                  </cfif>

                  <cfqueryparam value="#generatePermitNumber()#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Delivery_Method#" cfsqltype="CF_SQL_NUMERIC">,

                  <cfqueryparam value="#arguments.Certified_Mail_Number#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Inspector_Name#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Inspector_Phone#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Discharge_Address_Entered#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfif arguments.Discharge_Address_Number neq "-1">

                   <cfqueryparam value="#arguments.Discharge_Address_Number#" cfsqltype="CF_SQL_NUMERIC">,

                  <cfelse>

                   null,

                  </cfif>

                  <cfqueryparam value="#arguments.Discharge_Address_Street_Name#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Discharge_Address2#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Discharge_City#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Discharge_State#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Discharge_Zip#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Owner_First_Name#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Owner_Last_Name#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Owner_Phone#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Owner_Fax#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Owner_Email#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.MailingSame#" cfsqltype="CF_SQL_BIT">,

                  <cfqueryparam value="#arguments.Mailing_Address1#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Mailing_Address2#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Mailing_City#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Mailing_State#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Mailing_Zip#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Pro_Discharge#" cfsqltype="CF_SQL_BIT">,

                  <cfqueryparam value="#arguments.Maintenance_Company_ID#" cfsqltype="CF_SQL_NUMERIC">,

                  <cfqueryparam value="#arguments.Start_Date#" cfsqltype="CF_SQL_TIMESTAMP">,

                  <cfqueryparam value="#arguments.End_Date#" cfsqltype="CF_SQL_TIMESTAMP">,

                  <cfqueryparam value="#arguments.altDischarge#" cfsqltype="CF_SQL_NUMERIC">,

                  <cfqueryparam value="#arguments.Discharge_Point#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Volume#" cfsqltype="CF_SQL_NUMERIC">,

                  <cfqueryparam value="#arguments.Requested_Flow_Rate#" cfsqltype="CF_SQL_NUMERIC">,

                  <cfqueryparam value="#arguments.Is_Saltwater#" cfsqltype="CF_SQL_BIT">,

                  <cfqueryparam value="#arguments.Has_Solids#" cfsqltype="CF_SQL_BIT">,

                  <cfqueryparam value="#arguments.Solids_Treatment#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Has_Copper#" cfsqltype="CF_SQL_BIT">,

                  <cfqueryparam value="#arguments.Copper_Treatment#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Water_pH#" cfsqltype="CF_SQL_NUMERIC">,

                  <cfqueryparam value="#arguments.pH_Treatment#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.created_by#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Comments#" cfsqltype="CF_SQL_VARCHAR">,

                  <cfqueryparam value="#arguments.Preferred_Delivery_Method#" cfsqltype="CF_SQL_VARCHAR">

                 )

              • 4. Re: ColdFusion 8 Migration ColdFusion 11
                nic_tunney Adobe Community Professional

                Are you using named arguments when calling that beast of a function, or are you passing each individually?  It is difficult when you are mixing required arguments.  I'd still ensure you are passing everything and not missing something that is throwing off the arguments if you aren't using named arguments in the call.

                • 5. Re: ColdFusion 8 Migration ColdFusion 11
                  Imran Chaudhary_857 Level 1

                  I changed numberic data type to any to make it work. I don't know why i need to change the data type, just cause we moved to new coldfusion.