Coldfusion 11 Beta and Transfer Error

55 views
Skip to first unread message

Alan Bullpitt

unread,
Apr 1, 2014, 4:36:49 PM4/1/14
to transf...@googlegroups.com
I was asked to evaluate some of the new pdf functions from Coldfusion 11 with our existing model glue 3.1 site. However the application breaks during initialisation with the following error:

DetailEnsure that the method is defined, and that it is spelled correctly.
MessageThe method init was not found in component transfer.com.TransferObject.

COLUMN0
IDCF_TEMPLATEPROXY
LINE44
RAW_TRACEat cfTransferDecorator2ecfc420371616$funcINIT.runFunction(C:\HOME\transfer\com\TransferDecorator.cfc:44)
TEMPLATEC:\HOME\transfer\com\TransferDecorator.cfc
TYPECFML

Has anyone tried this yet. The issue seems to be with the way the init function is injected into the object. 

Alan Bullpitt

unread,
Apr 2, 2014, 1:24:57 PM4/2/14
to transf...@googlegroups.com
The issue is with cfinclude in Coldfusion 11. By default you can no longer include any files except CFM files. Transfer includes '.transfer' files. This can be overwritten in the coldfusion server file neo-runtime.xml as outlined here https://wikidocs.adobe.com/wiki/display/coldfusionen/New+in+ColdFusion#NewinColdFusion-Restrictions . However even after including .transfer files in the allowed list the application still broke. It seems to read the file in as a string rather than including the required functions. To get around this I updated the getDefinitionFileName function in the following 2 files /transfer/com/dynamic/ObjectWriter.cfc and  /transfer/com/dynamic/DecorateWriter.cfc. Instead of creating a .transfer file I changed it to create a .transfer.cfm file. Including a CFM file works as originally designed.  


DecoratorWriter.cfc

<cffunction name="getDefinitionFileName" hint="Creates the name that the file defition will be saved under" access="public" returntype="string" output="false">
<cfargument name="object" hint="BO of the Object" type="transfer.com.object.Object" required="Yes">
<cfscript>
//use the @ symbol to diffentiate between a transferObject and a Decorator.
return arguments.object.getClassName() & "@" & arguments.object.getHash() & ".transfer.cfm";
</cfscript>
</cffunction>

ObjectWriter.cfc

<cffunction name="getDefinitionFileName" hint="Creates the name that the file defition will be saved under" access="public" returntype="string" output="false">
<cfargument name="object" hint="BO of the Object" type="transfer.com.object.Object" required="Yes">
<cfscript>
//used the $ symbol to look like UDF & CFC Java class name.
return arguments.object.getClassName() & "$" & arguments.object.getHash() & ".transfer.cfm";
</cfscript>
</cffunction>

Mark is their any issue with saving these files as CFM files?

Mark Mandel

unread,
Apr 2, 2014, 2:54:35 PM4/2/14
to transf...@googlegroups.com

I can't think of anything off the top my head. You may want to keep them in a directory that is non web accessible.

Sent from my mobile doohickey

--
--
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
 
Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
 
You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To post to this group, send email to transf...@googlegroups.com
To unsubscribe from this group, send email to transfer-dev...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to transfer-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alan Bullpitt

unread,
Apr 2, 2014, 5:50:55 PM4/2/14
to transf...@googlegroups.com
Cheers Mark. We have them in a non-accessible folder already. Once this change was made Transfer is back up and running as normal.

Mark Mandel

unread,
Apr 2, 2014, 6:05:03 PM4/2/14
to transf...@googlegroups.com
Again, happy to help someone become the canonical place for all these Transfer tweaks to reside.

Mark


On Thu, Apr 3, 2014 at 8:50 AM, Alan Bullpitt <a_bul...@hotmail.com> wrote:
Cheers Mark. We have them in a non-accessible folder already. Once this change was made Transfer is back up and running as normal.

--
--
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
 
Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
 
You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To post to this group, send email to transf...@googlegroups.com
To unsubscribe from this group, send email to transfer-dev...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to transfer-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian G

unread,
Jul 11, 2014, 12:44:01 PM7/11/14
to transf...@googlegroups.com
Alan,

This is a very interesting discovery.  I'm on CF10 and have posted about similar errors before - where CF reports it can't find a method on a Transfer object which clearly exists (because it was running before the restart and runs again after an additional restart).  I have added some logging to my Transfer instance and noticed something last night on my latest restart that caught my eye.

Basically, I am trapping the method not found errors here in Transfer.cfc around line 82:

if(object.hasDecorator())
{
    decorator = getDynamicManager().createDecorator(object, transfer);

    // BDG 5/5/2014: trying to get more info about the set*() doesn't exist failures
    try {
        decorator = decorator.init(this, transfer, getUtility(), getNullable(), getDatasource(), getTransaction());
    }
    catch (any ex) {
        // ok we are probably missing a mixin like setStylesheet() so let's do some instrumenting:
        writeLog(type = "Error", file = "transfer-fail", text="[#ex.message# / #ex.detail#] #decorator.getClassName()#, persisted: #decorator.getIsPersisted()#, members: #listSort(structKeyList(decorator), "textnocase")#");
        rethrow;
    }
    getEventManager().fireAfterNewEvent(decorator);

    return decorator;
}

It's that second writeLog/exception which was triggered and here is what I logged last night:

Jul 11, 2014 03:50:11 AM Error [ajp-bio-8016-exec-3] - [The method setEventType was not found in component transfer.com.TransferObject. /
 Ensure that the method is defined, and that it is spelled correctly.] system.audit, persisted: false, members:
actionAfterCreateTransferEvent,actionAfterDeleteTransferEvent,actionAfterDiscardTransferEvent,...*setEventType*,....validate

Somehow, someway, the "setEventType" member is in a structKeyList of the object but it is not a method?!   I'm going to add some additional logging now that I've seen this to try to get to the bottom of it.  Again, I'm still running Java 6 because 7 made these XML parsing errors an order of magnitude worse.

I have considered rewriting the XML Configuration loader to be JSON based instead.  There is something funky about XML processing under load in CF10 (that didn't exist in my CF8 installation).   It only seems to happen on production but it happens with irregular regularity (e.g., the error is never the same one twice but the type of error happens on more than 50% of my restarts).

I'll report back if I learn anything additional... at least on CF10, the *.cfm doesn't appear to be the problem, but it's interesting that the same kind of error happens.  I also frequently get Transfer.MissingInclude errors on restarts that look like:

Transfer.MissingInclude: Error found in: /PUKKA_MAP/generated/event.eventtype$0A496A80FD7D3AB0748ED7616BB8EB08.transfer

Could not find the included template /PUKKA_MAP/generated/event.eventtype$0A496A80FD7D3AB0748ED7616BB8EB08.transfer. : Note: If you wish to use an absolute template path (for example, template="/mypath/index.cfm") with CFINCLUDE, you must create a mapping for the path using the ColdFusion Administrator. Or, you can use per-application settings to specify mappings specific to this application by specifying a mappings struct to THIS.mappings in Application.cfc.
Using relative paths (for example, template="index.cfm" or template="../index.cfm") does not require the creation of any special mappings. It is therefore recommended that you use relative paths with CFINCLUDE whenever possible.

  • /pukka/prod1/transfer/com/dynamic/TransferBuilder.cfc (142, CFTHROW)
  • /pukka/prod1/transfer/com/dynamic/TransferBuilder.cfc (84, CF_TEMPLATEPROXY)
  • /pukka/prod1/transfer/com/dynamic/cf8/TransferBuilder.cfc (52, CF_UDFMETHOD)
  • /pukka/prod1/transfer/com/dynamic/DynamicManager.cfc (47, CF_TEMPLATEPROXY)
  • /pukka/prod1/transfer/com/Transfer.cfc (74, CF_TEMPLATEPROXY)
  • /pukka/prod1/transfer/com/TransferObject.cfc (196, CF_TEMPLATEPROXY)
  • /pukka/prod1/transfer/com/TransferObject.cfc (166, CF_UDFMETHOD)
  • /pukka/prod1/generated/event.event$E0E4B7F08B3B074EB8F4CD4C92180F78.transfer (799, CF_UDFMETHOD)
  • /pukka/prod1/generated/event...@E0E4B7F08B3B074EB8F4CD4C92180F78.transfer (116, CF_TEMPLATEPROXY)
  • /pukka/prod1/transfer/com/dynamic/MethodInvoker.cfc (47, CFINVOKE)
  • /pukka/prod1/transfer/com/dynamic/TransferPopulator.cfc (91, CF_TEMPLATEPROXY)
  • /pukka/prod1/transfer/com/dynamic/DynamicManager.cfc (82, CF_TEMPLATEPROXY)
  • /pukka/prod1/transfer/com/Transfer.cfc (726, CF_TEMPLATEPROXY)
  • /pukka/prod1/generated/event.event$E0E4B7F08B3B074EB8F4CD4C92180F78.transfer (635, CF_TEMPLATEPROXY)
  • /pukka/prod1/generated/event.event$E0E4B7F08B3B074EB8F4CD4C92180F78.transfer (946, CF_UDFMETHOD)
  • /pukka/prod1/generated/event...@E0E4B7F08B3B074EB8F4CD4C92180F78.transfer (73, CF_TEMPLATEPROXY)
Definitely something to look into on my end.

I'm considering putting my /generated/ folder onto a RAM disk to see if it has any impact on file writing/reading.  Anyone tried that before?


Brian
Reply all
Reply to author
Forward
0 new messages