My favorites | Sign in
Project Home Downloads Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 89: debug() cannot duplicate a component in CF7
1 person starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  virtix
Closed:  Jan 2009
Cc:  marc.es...@gmail.com, AnodyneP...@gmail.com


 
Project Member Reported by virtix, Mar 11, 2008
This may end up being a known issue as it appears to be a shortcoming with
CF7. Seems ok in CF8. Not sure what happens in CF 6. Where's that free
VM-Ware anyway? Not sure either if there's a workaround. Use getmetadata()?

What steps will reproduce the problem?
1. In a testcase, try to add an instance of a CFC to debug(mycfc)
2. Try to run the test

What is the expected output? 

What do you see instead?

Unable to duplicate a ColdFusion Component.
ColdFusion does not support making a copy of a ColdFusion Component.
 
The error occurred in
C:\CFusionMX7\wwwroot\mxunit\framework\TestResult.cfc: line 132
Called from C:\CFusionMX7\wwwroot\mxunit\framework\TestSuite.cfc: line 180
Called from C:\CFusionMX7\wwwroot\mxunit\runner\DirectoryTestSuite.cfc: line 33
Called from C:\CFusionMX7\wwwroot\mxunit\runner\HttpAntRunner.cfc: line 27

130 :   <cfargument name="debugData" type="Any" required="true" hint="Data
to add to debug array">
131 :   <!--- TestResult.setDebug() --->
132 :   <cfset this.resultItem.debug = duplicate(arguments.debugData) />
133 : </cffunction>
134 : 

Stack Trace:
coldfusion.runtime.CFPage$UnableToDuplicateCFCException: Unable to
duplicate a ColdFusion Component.
	at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:96)
	at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:50)
	at coldfusion.runtime.Struct.duplicate(Struct.java:63)
	at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:74)
	at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:50)
	at coldfusion.runtime.Array.Duplicate(Array.java:76)
	at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:62)
	at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:50)
	at coldfusion.runtime.CFPage.Duplicate(CFPage.java:5891)
	at
cfTestResult2ecfc27140902$funcSETDEBUG.runFunction(C:\CFusionMX7\wwwroot\mxunit\framework\TestResult.cfc:132)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290)
	at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:194)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:146)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1634)
	at
cfTestSuite2ecfc262243923$funcRUN.runFunction(C:\CFusionMX7\wwwroot\mxunit\framework\TestSuite.cfc:180)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290)
	at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:194)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:146)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1634)
	at
cfDirectoryTestSuite2ecfc1285432942$funcRUN.runFunction(C:\CFusionMX7\wwwroot\mxunit\runner\DirectoryTestSuite.cfc:33)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290)
	at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:366)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:198)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:157)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1594)
	at
cfHttpAntRunner2ecfc2128678627$funcRUN.runFunction(C:\CFusionMX7\wwwroot\mxunit\runner\HttpAntRunner.cfc:27)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290)
	at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:366)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:198)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:157)
	at coldfusion.filter.ComponentFilter.invoke(ComponentFilter.java:158)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
	at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
	at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
	at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.xml.rpc.CFCServlet.invoke(CFCServlet.java:106)
	at coldfusion.xml.rpc.CFCServlet.doGet(CFCServlet.java:157)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
	at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
	at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
	at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
	at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
	at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
	at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
	at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
	at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
	at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
 
Mar 11, 2008
Project Member #1 AnodyneP...@gmail.com
That's not a bug, it's a feature.  Oh wait, it's a bug.  This was one of the big
improvements in cf8.  I used to run into problems with this all the time with both
cf7 and 6.  Strangely enough, now that it works, I don't run into the need for this
as much as I did.  

Under cf7, I wound up doing things like creating a structure to hold the properties
of each component and returning that.  It's a lot of work to get it to function
reliably that way.  
Mar 13, 2008
Project Member #2 virtix
Let's close this and make it a known issue. Objections?
Status: WontFix
Mar 14, 2008
Project Member #3 virtix
I'm re-opening this for build purposes only. I'm not suggesting we try to fix this,
but let's fail gently. In other words, let's output something like "Cannot debug
components is CF7", instead of an error. This way builds can be run on any machine.
My habit is to  work on cf8 at work and cf7 at home to help with compatability.

if(left(server.coldfusion.productversion, 1) lt 8) ... 
addToDebug("Cannot debug components is CF7 or under")

Status: Started
Mar 14, 2008
Project Member #4 marc.es...@gmail.com
what about just not duplicating it if it's not cf8? b/c the problem is in the
duplication, right?

duplicate, i think, is essential for structs. but for components... i don't think
it'll add much value anyway.

hell.... it might even be better to instead of returning the component, return
getMetadata(component). or maybe if it's 7, return getmetadata(), and if it's 8,
return the component. or maybe make that configurable in mxunit-config. because i
know for myself, i'd rather have the metadata than that compnent junk 9.99 times out
of 10!  something makes me think that if you add a component to debug, it might fail
when run in the eclipse plugin anyway.  just a thought.
Jan 22, 2009
Project Member #5 virtix
just make as a known issue.
Status: WontFix
Cc: -v.rajkumar -axsaheli

Powered by Google Project Hosting