• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfc error

Explorer ,
Feb 28, 2007 Feb 28, 2007

Copy link to clipboard

Copied

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
TOPICS
Advanced techniques

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Mar 07, 2007 Mar 07, 2007
I found the issue. It was because I was calling a UDF in the CFC. Once I took the UDF out everything worked ok.

Votes

Translate

Translate
Contributor ,
Feb 28, 2007 Feb 28, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 01, 2007 Mar 01, 2007

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 01, 2007 Mar 01, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 01, 2007 Mar 01, 2007

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2007 Mar 01, 2007

Copy link to clipboard

Copied

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.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 01, 2007 Mar 01, 2007

Copy link to clipboard

Copied

What happens if you browse directly to the CFC file?

--
Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 02, 2007 Mar 02, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 02, 2007 Mar 02, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 07, 2007 Mar 07, 2007

Copy link to clipboard

Copied

LATEST
I found the issue. It was because I was calling a UDF in the CFC. Once I took the UDF out everything worked ok.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation