Hello,
 
im writing this email for a few reasons:
 
1. To save some ppl from debugging for hours just to find out that its a bug in the code that comes with ColdFusion.
2. In hope to get some pointers on how to work around these bugs.
3. In hope to reach the ppl from adobe that made this product and push em to get the new code (or the source so i can fix it myself) out.
 
(btw, english is not my native language so sorry for bad grammar and stuff)
 
 
Bug #1 CFASSerializer does not check super classes
 
Those of you that use value objects most likely encountered this problem. When you send back an instance of a value object (a cfc with cfproperty tags, getters and setters) it does not get serialized correctly. Only properties defined in the cfc itself are serialized, properties defined in super classes are not included.
 
For the ppl at adobe:
 
the method which handles this has the followin signature: "ASObject translate(TemplateProxy result) throws NeoException" and is located in the coldfusion.flash.messaging.io.amf.Translator.CFASSerializer class (flashremoting_update.jar). A bit down in the function the metadata of the component is requested and its properties are gathered. I would have expected code that checks the "extends" property of the metadata to repeat the properties gathering process. I could fix the problem myself if i had the source code of the class (and the code for the invoke method of the coldfusion.flash.messaging class which uses the CFCASSerializer class).
 
Work around:
 
Add cfproperty tags of each available property in sub-cfc', getters and setters can remain in super cfc's.
 
 
Bug #2: Application.cfc looses context if called from different domains.
 
This problem is only testen on a machine that has ColdFusion running under JRun on Windows XP with Apache as a webservice. In apache I have defined 2 virual hosts (app1 and app2). In my hosts file (in xp located at  C:\WINDOWS\system32\drivers\etc) i added two entries:
 
127.0.0.1    app1
127.0.0.1    app2
 
In both directories i have the following files:
 
index.cfm         - serves an swf file which does a RemoteObject call to the "ColdFusion" destination
app1.swf/app2.swf - the swf that actually does the call
App.cfc           - the cfc that is called from the swf
Application.cfc   - Gets accessed for each request
 
index.cfm is just app1.html (or app2.html depending on the directory) renamed to index.cfm
 
appX.mxml (replace X with the application number) contains a start method which does the remoting call.
 
App.cfc contains a remotely accessable method which returns a simple string.
 
Application.cfc contains the following code:
 
<cfcomponent>
   <cffunction name="_init" access="private" returntype="void">
      <cftry>
         <cfset test() />
         <cfcatch type="any">
             <cfmail to="[EMAIL PROTECTED]" from=" [EMAIL PROTECTED]" subject="#cgi.SCRIPT_NAME#" type="html">
                   <cfoutput>#replace(cfcatch.stacktrace, chr(13), "<br />", "all")#</cfoutput>
             </cfmail>
         </cfcatch>
      </cftry>
   </cffunction>
  
   <cfset _init() />
</cfcomponent>
 
After you have called either http://app1 or http://app2 you will receive two emails with stack traces in it. A copy of a portion of those is included bellow. Depending on which application you called first after a restart of your coldfusion server, the Application.cfc that gets called first will be stuck in cache.
 
In this case app1 was called. First the entry which is caused by calling index.cfm:
 
at cfApplication2ecfc1765161969.runPage(C:\wwwroot\App1\Application.cfc:13)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
This one is caused by the remoting call:
 
at cfApplication2ecfc1765161969.runPage(C:\wwwroot\App2\Application.cfc:13)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java :152)
 
As you can see in the remoting call, the context is wrong, we are calling app1 while we get the Application.cfc of app2. This causes alot of problems cause i am using the location of Application.cfc to get the absolute path to the application root (using getCurrentTemplatePath()).
 
I have not yet found a way to work around this problem yet...
 
 
Bug #3: String contents of structs get converted to instances of coldfusion.sql.QueryColumn
 
I did not have the time to research this phenomenon. When i send a struct through some functions, somewhere along the way the string contents of my struct elements are converted to instances of coldfusion.sql.QueryColumn . Till i have the time to check the bug out i build a small little function that converts the values in the struct back to a string.
 
 
I will keep you updated of anything i find. If you have problems reproducing bug #1 or #2 please contact me. If you have any suggestions, please reply. And if you have any comment, please feel free to let out. Thnx for reading.
 
 
Greetz Erik
 
 
 
 
 
 
__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to