Strange error trying to run validate()

8 views
Skip to first unread message

Bill Berzinskas

unread,
Nov 11, 2009, 1:26:38 PM11/11/09
to ValidateThis
Hey all,

I'm working thru setting up validateThis, and i'm getting a wierd
error when i call validate().. It's not a CF error, per se.. It
looks like one, but isn't.. It states: java.lang.ClassCastException
and thats REALLY all it says.. No stack trace, or tag context..

I'm doing a really simple validation, derived from the sample app..
My XML looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<validateThis xsi:noNamespaceSchemaLocation="validateThis.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<objectProperties>
<property name="applicationName" desc="Application Name">
<rule type="required" />
</property>
<property name="instanceName" desc="Instance Name">
<rule type="required" />
</property>
</objectProperties>
</validateThis>

I can see in my CF Debug, that these two calls get made to the
framework:
CFC[ C:\htdocs\ValidateThis\util\onMMHelper.cfc | doInvoke(init,
[complex value], CFC: ValidateThis.util.Result) ] from C:\htdocs
\ValidateThis\util\onMMHelper.cfc

CFC[ C:\htdocs\ValidateThis\util\TransientFactoryNoCS.cfc |
onMissingMethod() ] from C:\htdocs\ValidateThis\util
\TransientFactoryNoCS.cfc

As you can see, I'm not using coldspring, and I'm trying to validate a
transfer object..

HELP! :-)

Bob Silverberg

unread,
Nov 11, 2009, 1:51:00 PM11/11/09
to valida...@googlegroups.com
I'm not sure I understand how you're not getting any additional info on the error. Do you have "

Some other info that would be helpful:

What platform/version of OS and CF are you using?
What does the code that calls VT look like?

Thanks,
Bob

Bill Berzinskas

unread,
Nov 11, 2009, 1:57:50 PM11/11/09
to ValidateThis
ok.. actually, THAT error was something else, and a restart of CF
fixed it, which brings me back the problem I was initially having..

java.lang.Integer cannot be cast to java.lang.String

this is thrown from onMMHelper.cfc line 49

CF8.0.1 on win2k3 server

Bill Berzinskas

unread,
Nov 11, 2009, 2:02:46 PM11/11/09
to ValidateThis
actually, line 48. typo..

the code calling validate looks like this:

<cfset validation = application.validateThis.validate
(theObject=site,objectType="site.site") />

Bob Silverberg

unread,
Nov 11, 2009, 2:11:25 PM11/11/09
to valida...@googlegroups.com
I think you're using an older version of the framework. I scrapped onMMHelper in the last version as I didn't need it anymore after Railo fixed a bug. Please download the latest from validatethis.riaforge.org and try again.

Thanks,
Bob

Bill Berzinskas

unread,
Nov 11, 2009, 2:24:37 PM11/11/09
to ValidateThis
it is in fact 0.851 from riaforge that I'm using!

On Nov 11, 2:11 pm, Bob Silverberg <bob.silverb...@gmail.com> wrote:
> I think you're using an older version of the framework. I scrapped
> onMMHelper in the last version as I didn't need it anymore after Railo fixed
> a bug. Please download the latest from validatethis.riaforge.org and try
> again.
>
> Thanks,
> Bob
>

Bob Silverberg

unread,
Nov 11, 2009, 2:48:05 PM11/11/09
to valida...@googlegroups.com
I'm confused. I just checked the download and it does seem to have the changes removing the reliance on onMMHelper.  What's the full stack trace, so I can see what's calling what?
--
Bob Silverberg
www.silverwareconsulting.com

Bill Berzinskas

unread,
Nov 11, 2009, 3:40:52 PM11/11/09
to ValidateThis
looks to be happening inside of transientFactoryNoCS.cfc... stack
trace below..

java.lang.ClassCastException: java.lang.Integer cannot be cast to
java.lang.String at coldfusion.runtime.TemplateProxy.invoke
(TemplateProxy.java:510) at coldfusion.runtime.TemplateProxy.invoke
(TemplateProxy.java:320) at coldfusion.runtime.CfJspPage._invoke
(CfJspPage.java:2222) at coldfusion.tagext.lang.InvokeTag.doEndTag
(InvokeTag.java:362) at
cfonMMHelper2ecfc1996901903$funcDOINVOKE.runFunction(C:\htdocs
\ValidateThis\util\onMMHelper.cfc:48) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:
360) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke
(UDFMethod.java:324) at coldfusion.filter.FunctionAccessFilter.invoke
(FunctionAccessFilter.java:59) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:448) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:308) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2272) at
cfTransientFactoryNoCS2ecfc505326219$funcCREATE.runFunction(C:\htdocs
\ValidateThis\util\TransientFactoryNoCS.cfc:38) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:
360) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke
(UDFMethod.java:324) at coldfusion.filter.FunctionAccessFilter.invoke
(FunctionAccessFilter.java:59) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192) at
coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471) at
cfTransientFactoryNoCS2ecfc505326219$funcONMISSINGMETHOD.runFunction(C:
\htdocs\ValidateThis\util\TransientFactoryNoCS.cfc:55) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:
360) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke
(UDFMethod.java:324) at coldfusion.filter.FunctionAccessFilter.invoke
(FunctionAccessFilter.java:59) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:233) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:469) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:308) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2272) at
cfServerValidator2ecfc1889295950$funcVALIDATE.runFunction(C:\htdocs
\ValidateThis\server\ServerValidator.cfc:41) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:
360) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke
(UDFMethod.java:324) at coldfusion.filter.FunctionAccessFilter.invoke
(FunctionAccessFilter.java:59) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:448) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:308) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2272) at
cfBOValidator2ecfc677136220$funcVALIDATE.runFunction(C:\htdocs
\ValidateThis\core\BOValidator.cfc:139) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:
360) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke
(UDFMethod.java:324) at coldfusion.filter.FunctionAccessFilter.invoke
(FunctionAccessFilter.java:59) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:448) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:308) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2272) at
cfValidateThis2ecfc229161104$funcVALIDATE.runFunction(C:\htdocs
\ValidateThis\ValidateThis.cfc:58) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:
360) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke
(UDFMethod.java:324) at coldfusion.filter.FunctionAccessFilter.invoke
(FunctionAccessFilter.java:59) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:463) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:453) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:320) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2222) at
cfeditSite2ecfm1737227393.runPage(C:\htdocs\bberzinskas\siteSettings
\editSite.cfm:27) at coldfusion.runtime.CfJspPage.invoke
(CfJspPage.java:196) at coldfusion.tagext.lang.IncludeTag.doStartTag
(IncludeTag.java:370) at coldfusion.runtime.CfJspPage._emptyTcfTag
(CfJspPage.java:2661) at
cfApplication2ecfc1861341297$funcONREQUEST.runFunction(C:\htdocs
\bberzinskas\siteSettings\Application.cfc:78) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:
360) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke
(UDFMethod.java:324) at coldfusion.filter.FunctionAccessFilter.invoke
(FunctionAccessFilter.java:59) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:448) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:308) at
coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:74) at
coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:243)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:
269) at coldfusion.filter.MonitoringFilter.invoke
(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke
(PathFilter.java:86) 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.CfmServlet.service(CfmServlet.java:175) 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) at
com.seefusion.Filter.doFilter(Filter.java:49) at
com.seefusion.SeeFusion.doFilter(SeeFusion.java:1500) at
jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at
jrun.servlet.FilterChain.service(FilterChain.java:101) at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:
286) at jrun.servlet.ServletEngineService.dispatch
(ServletEngineService.java:543) at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable
(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool
$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable
(ThreadPool.java:428) at jrunx.scheduler.ThreadPool
$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at
jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Bob Silverberg

unread,
Nov 11, 2009, 4:34:44 PM11/11/09
to valida...@googlegroups.com
I stand corrected. I _thought_ I had released those changes, but it looks like I didn't.  I'm just running through my unit tests and I hope to have a new version available shortly.  I'm also going to look at your specific error, because that old version should still be working, methinks.

Sorry,
Bob

Bill Berzinskas

unread,
Nov 11, 2009, 7:23:46 PM11/11/09
to valida...@googlegroups.com
All good, i totally understand..  Let me know if you come up with a fix so i can just go ahead and apply that in the interim..   While I *COULD* implement coldspring, I'm still working up to it..   :-)

Thanks!
-B

Bob Silverberg

unread,
Nov 11, 2009, 10:41:19 PM11/11/09
to valida...@googlegroups.com
Hi Bill,

I have no idea what's causing the problem in your install, but I've just now uploaded version 0.9 of VT to validatethis.riaforge.org, so please grab the most recent copy and try it again.

Thanks,
Bob

Bill Berzinskas

unread,
Nov 12, 2009, 7:55:26 AM11/12/09
to ValidateThis
well, it's not going thru onMMHelper now, but i'm still getting that
error: java.lang.Integer cannot be cast to java.lang.String

this happens in transientfactorynocs line 35.. (called from
serverValidator line 51)

Is this issue with my transfer object you think? Also, inside my
validation rule xml, do i have to define all the fields in my object?

On Nov 11, 10:41 pm, Bob Silverberg <bob.silverb...@gmail.com> wrote:
> Hi Bill,
>
> I have no idea what's causing the problem in your install, but I've just now
> uploaded version 0.9 of VT to validatethis.riaforge.org, so please grab the
> most recent copy and try it again.
>
> Thanks,
> Bob
>
> On Wed, Nov 11, 2009 at 7:23 PM, Bill Berzinskas <b...@diffuseaudio.com>wrote:
>
>
>
> >  All good, i totally understand..  Let me know if you come up with a fix so
> > i can just go ahead and apply that in the interim..   While I *COULD*
> > implement coldspring, I'm still working up to it..   :-)
>
> > Thanks!
> > -B
>
> > Bob Silverberg wrote:
>
> > I stand corrected. I _thought_ I had released those changes, but it looks
> > like I didn't.  I'm just running through my unit tests and I hope to have a
> > new version available shortly.  I'm also going to look at your specific
> > error, because that old version should still be working, methinks.
>
> >  Sorry,
> > Bob
>

Bill Berzinskas

unread,
Nov 12, 2009, 7:56:08 AM11/12/09
to ValidateThis
correction servervalidator line 41

Bob Silverberg

unread,
Nov 12, 2009, 5:57:11 PM11/12/09
to valida...@googlegroups.com
I'm at a loss on this one. I don't see anything that could possibly be causing that error, and it doesn't seem to be affecting anyone else. Could you please double check that you are in fact on CF 8.0.1, and not 8.0, because that would make a difference.  Just put a <cfdump var="#server#"> into your template and see what it outputs.

If that's not your issue, then I'd ask that you package up your sample app and send it to me and I'll see if I can recreate the problem. If I cannot then maybe we can do some interactive debugging over IM.  

Thanks,
Bob
Reply all
Reply to author
Forward
0 new messages