Title:
Bug 77253:(Watson Migration Closure)I have a CFC with the following function defined:
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/LowImpact
Reporter/Name(from Bugbase): Darron Schall / Darron Schall (darronschall)
Created: 05/14/2009
Components: General Server
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,233019 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Mac 10 All
Vote Count: 0
Problem:
I have a CFC with the following function defined:
<cffunction name="saveItem" output="false" access="remote" returntype="Product" >
<cfargument name="item" type="Product" required="true" />
<cfreturn EntitySave( item ) />
</cffunction>
When I try to use this function, I get an unfriendly error message:
Error Occurred While Processing Request
cannot cast void to non-void
The error doesn't describe the page that the error occured on. Rather, the error is just a java stack trace with an IllegalArgumentException. It took me awhile to figure out where the error actually was.
It would be better if a regular CF error was displayed saying the template and line number of the error, since trying to track down just the java stack trace dump was time consuming.
Method:
a.cfm:
<cfset a = createobject("c1")>
<cfset a.method1()>
c1.cfc:
<cfcomponent>
<cffunction name="method1" returntype="product">
<cfoutput>In Method1!!!!</cfoutput>
<cfreturn EntitySave("c1")>
</cffunction>
</cfcomponent>
Run a.cfm
Result:
java.lang.IllegalArgumentException: cannot cast void to non-void
at coldfusion.compiler.ExprAssembler.cast(ExprAssembler.java:1297)
at coldfusion.compiler.ExprAssembler.cast(ExprAssembler.java:1270)
at coldfusion.compiler.StmtAssembler.cast(StmtAssembler.java:396)
at coldfusion.compiler.ExprAssembler.assembleExpr(ExprAssembler.java:187)
at coldfusion.compiler.StmtAssembler.cfreturn(StmtAssembler.java:483)
at coldfusion.compiler.StmtAssembler.assembleStatement(StmtAssembler.java:294)
at coldfusion.compiler.FunctionAssembler.assembleStatement(FunctionAssembler.java:235)
at coldfusion.compiler.StmtAssembler.block(StmtAssembler.java:218)
at coldfusion.compiler.FunctionAssembler.function(FunctionAssembler.java:188)
at coldfusion.compiler.FunctionAssembler.assemble(FunctionAssembler.java:90)
at coldfusion.compiler.TemplateAssembler.assembleFunctions(TemplateAssembler.java:292)
at coldfusion.compiler.TemplateAssembler.assemble(TemplateAssembler.java:98)
at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:350)
at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:144)
at coldfusion.runtime.TemplateClassLoader$TemplateCache$1.fetch(TemplateClassLoader.java:424)
at coldfusion.util.LruCache.get(LruCache.java:180)
at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(TemplateClassLoader.java:362)
at coldfusion.util.AbstractCache.fetch(AbstractCache.java:58)
at coldfusion.util.SoftCache.get_statsOff(SoftCache.java:133)
at coldfusion.util.SoftCache.get(SoftCache.java:81)
at coldfusion.runtime.TemplateClassLoader.findClass(TemplateClassLoader.java:604)
at coldfusion.runtime.TemplateClassLoader.newInstance(TemplateClassLoader.java:540)
at coldfusion.runtime.TemplateClassLoader.newInstance(TemplateClassLoader.java:523)
at coldfusion.orm.mapping.CFPropertyBinder.getMetaData(CFPropertyBinder.java:112)
at coldfusion.orm.mapping.CFPropertyBinder.<init>(CFPropertyBinder.java:96)
at coldfusion.orm.hibernate.HibernateConfiguration.generateHbmDocFromCFCs(HibernateConfiguration.java:600)
at coldfusion.orm.hibernate.HibernateConfiguration.buildConfiguration(HibernateConfiguration.java:401)
at coldfusion.orm.hibernate.HibernateConfiguration.initHibernateConfiguration(HibernateConfiguration.java:176)
at coldfusion.orm.hibernate.HibernateConfiguration.<init>(HibernateConfiguration.java:137)
at coldfusion.orm.hibernate.ConfigurationManager.initConfiguration(ConfigurationManager.java:69)
at coldfusion.orm.hibernate.HibernateProvider.InitializeORMForApplication(HibernateProvider.java:168)
at coldfusion.orm.hibernate.HibernateProvider.beforeApplicationStart(HibernateProvider.java:83)
at coldfusion.filter.ApplicationFilter.fireBeforeAppStartEvent(ApplicationFilter.java:417)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:207)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
at coldfusion.CfmServlet.service(CfmServlet.java:177)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
...[snip]...
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3038576
External Customer Info:
External Company:
External Customer Name: Darron Schall
External Customer Email: 65E53F91439B07610AAC0C15
External Test Config: 05/14/2009
Attachments:
Comments: