9 Replies Latest reply on Mar 7, 2007 8:44 AM by Jason_the_Mullerite

    cfc error

    Jason_the_Mullerite
      I have a very simple page that contains a one cell one column table with no graphics (I am just developing the code for a project at this point. I have a cfinvoke statement passing a cfinvokeargument. Below is my code:

      <table width="500" border="0" align="center">
      <tr>
      <td>
      <cfinvoke component="cfcs.cmsContentForms" method="displayContent" returnvariable="displayContent">
      <cfinvokeargument name="contentID" value="1"/>
      </cfinvoke>
      </td>
      </tr>
      </table>

      It was running fine and then just today it began to kick up this error:

      Unable to complete CFML to Java translation.
      Error information unsupported statement: class coldfusion.compiler.ASTfunctionDefinition

      The error occurred in D:\www\CMS\contentDisplay.cfm: line 5

      3 : <td>
      4 : <cfinvoke component="cfcs.cmsContentForms" method="displayContent" returnvariable="displayContent">
      5 : <cfinvokeargument name="contentID" value="1"/>
      6 : </cfinvoke>
      7 : </td>

      Any one have any ideas at all what the heck this means. I can't find anything online about it and as far as I can tell my code is good.

      Thanks,

      Jason
        • 1. Re: cfc error
          Dinghus Level 1
          Sounds like your server has barfed.

          BUT you could try doing some troubleshooting. Remove line 5 and hard code it into the CFC itself just to see what happens.
          • 2. Re: cfc error
            Jason_the_Mullerite Level 1
            I just tried that. The error then moved up to line 4. I copied a cfinvoke statement directly off of a CFC tutorial from Ben Forta and just changed the parameters and got the same message. Problem is I am getting the same message on both my staging server and on the shared hosting server that I use.

            I am completely confused!
            • 3. Re: cfc error
              Level 7
              That is a weird one, and unfortunately the weird ones are the most
              difficult to track down.

              Have you tried clearing your compiled classes ('cfclasses' under your
              coldfusion root) folder?

              You could also try accessing the component with different methods.

              <cfset componentObj = createObject("component","cfcs.cmsContentForms")>
              <cfset displayContent = componentObj.displayContent(1)>

              Also have you done anything inside the component that my be causing the
              problem? The line number being referenced may be referring to where the
              component is being used since something inside the component is causing
              the problem.

              • 4. Re: cfc error
                Jason_the_Mullerite Level 1
                Thanks,

                Tried both of those and got the same error:

                Error information unsupported statement: class coldfusion.compiler.ASTfunctionDefinition

                The error occurred in D:\www\CMS\contentDisplay.cfm: line 4

                2 : <tr>
                3 : <td>
                4 : <cfset componentObj = createObject("component","cfcs.cmsContentForms")>
                5 : <cfset displayContent = componentObj.displayContent(1)>
                6 : </td>

                I had it working at one point so I may just have to start again at square one and re-develop it until I break it again to know what I did (or until it works and then wonder what the heck I did the first time).

                Has any one else ever run into this error? It is very unhelpful as far as identifying the source of the problem!
                • 5. cfc error
                  BKBK Adobe Community Professional & MVP
                  Unable to complete CFML to Java translation.
                  Error information unsupported statement: class coldfusion.compiler.ASTfunctionDefinition


                  The cause is more likely the CFC. This is the kind of error message you get, for example, when you put a user-defined function in a CFC's function.


                  • 6. Re: cfc error
                    Level 7
                    What happens if you browse directly to the CFC file?

                    --
                    Adam
                    • 7. Re: cfc error
                      rich.leach Level 1
                      Have you tried playing with the cfarguments in the actual method in your CFC? A common translation issue is when you pass a variable that you believe to be of a certain datatype but the CFC method actually doesn't recognize it as that same datatype. Try either removing the cfargument tag alltogether in the displayContent() method in your cmsContentForms or setting the type attribute="Any", see if that yields any different results.

                      Good luck,

                      Rich

                      • 8. Re: cfc error
                        rich.leach Level 1
                        ahh... something else I forgot about:

                        Are you trying to pass/process any javascript in your method call?

                        http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264055

                        Hope this helps, and if not maybe it will get your "internal debugger" thinking in a different way ;-)

                        Rich
                        • 9. Re: cfc error
                          Jason_the_Mullerite Level 1
                          I found the issue. It was because I was calling a UDF in the CFC. Once I took the UDF out everything worked ok.