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/[email protected] 
   (*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/[email protected] 
   (*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


On Wednesday, April 2, 2014 10:24:57 AM UTC-7, Alan Bullpitt wrote:
>
> 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?
>

-- 
-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to