Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
vernade #1
ClassCastException
My company develops websites, most of them running on ColdFusion 6.1. Now we
are trying to migrate from ColdFusion 6.1 to ColdFusion 7.0 (for some
websites).
I was able to find and resolve most incompatibilities, save this next one: I'm
getting this Java stack trace from a ClassCastException which I cannot
interpret. I'm using my own Java classes in the background, but the stack trace
does not indicate an error in one of my classes. Furthermore, I cannot
determine a line in my .cfm files.
Can you give me a hint where to search for the error?
--------------- ColdFusion Error Message and Java Stack Trace ---------------
Error casting an object of type to an incompatible type. This usually
indicates a programming error in Java, although it could also mean you have
tried to use a foreign object in a different way than it was designed.
Please try the following:
* Check the ColdFusion documentation to verify that you are using the
correct syntax.
* Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8)
Gecko/20050511 Firefox/1.0.4
Remote Address 192.168.100.111
Referrer [url]http://terra.sirius.intern/page.cfm?vpath=index&nosearch[/url]
Date/Time 17-Jun-05 04:05 PM
Stack Trace
java.lang.ClassCastException
at coldfusion.compiler.ExprVisitor.insertCast(ExprVis itor.java:160)
at coldfusion.compiler.ExprVisitor.transform(ExprVisi tor.java:60)
at coldfusion.compiler.Treewalker.postorder(Treewalke r.java:84)
at coldfusion.compiler.Treewalker.postorder(Treewalke r.java:25)
at coldfusion.compiler.Treewalker.postorder(Treewalke r.java:25)
at coldfusion.compiler.Treewalker.postorder(Treewalke r.java:25)
at coldfusion.compiler.Treewalker.postorder(Treewalke r.java:25)
at coldfusion.compiler.Treewalker.postorder(Treewalke r.java:25)
at coldfusion.compiler.Treewalker.postorder(Treewalke r.java:25)
at coldfusion.compiler.Treewalker.postorder(Treewalke r.java:25)
at coldfusion.compiler.Treewalker.postorder(Treewalke r.java:25)
at coldfusion.compiler.NeoTranslator.translateJava(Ne oTranslator.java:302)
at coldfusion.compiler.NeoTranslator.translateJava(Ne oTranslator.java:106)
at
coldfusion.runtime.TemplateClassLoader$1.fetch(Tem plateClassLoader.java:282)
at coldfusion.util.LruCache.get(LruCache.java:188)
at
coldfusion.runtime.TemplateClassLoader$TemplateCac he.fetchSerial(TemplateClassLo
ader.java:223)
at coldfusion.util.AbstractCache.fetch(AbstractCache. java:58)
at coldfusion.util.SoftCache.get(SoftCache.java:81)
at
coldfusion.runtime.TemplateClassLoader.findClass(T emplateClassLoader.java:422)
at coldfusion.filter.PathFilter.invoke(PathFilter.jav a:79)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilt er.java:27)
at coldfusion.filter.ExceptionFilter.invoke(Exception Filter.java:50)
at coldfusion.filter.BrowserDebugFilter.invoke(Browse rDebugFilter.java:52)
at
coldfusion.filter.ClientScopePersistenceFilter.inv oke(ClientScopePersistenceFilt
er.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilt er.java:38)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilt er.java:38)
at coldfusion.filter.DatasourceFilter.invoke(Datasour ceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:105)
at coldfusion.bootstrap.BootstrapServlet.service(Boot strapServlet.java:78)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker. java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvok erChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequ estDispatcher.java:257)
at jrun.servlet.ServletEngineService.dispatch(Servlet EngineService.java:527)
at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable( JRunProxyService.java:204)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invok eRunnable(ThreadPool.java:349)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRu nnable(ThreadPool.java:457)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeR unnable(ThreadPool.java:295)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java :66)
vernade Guest
-
ClassCastException relating to cfloop and Structs?
I am upgrading a piece of code from CF5 to CF7, and it keeps getting ClassCastExceptions. This is the only real problem I've encountered in the... -
vernade #2
Re: ClassCastException
So, I was able to isolate a portion of the code which leads to the problem
above... obviously a complation error, although, I wonder why ColdFusion prints
the stack trace instead of a standard error message.
<cfif (hasPermission("editor,ptranslator", 0, getCurrentLocale()) and
jnodetype.getConfig().useHistory() and not
jnodetype.getConfig().isAutoPublish())
or (hasPermission("admin") and jnodetype.getConfig().useLocale() and
getLocales().RecordCount gt 1)>
<cfset showpublishtranslatebox = "yes">
</cfif>
vernade Guest
-
vernade #3
Re: ClassCastException
Also, this code produces the error message above:
<cfoutput><input type="hidden" name="instance" value="#instance#"></cfoutput>
It seems to me, that this is a ColdFusion Bug.
Has anyone other than me encountered this problem?
vernade Guest



Reply With Quote

