[Datatype Casting problem in Railo] can't cast Object type [Boolean] to a value of type [date]

53 views
Skip to first unread message

adnan....@gmail.com

unread,
Jan 29, 2015, 2:39:52 AM1/29/15
to transf...@googlegroups.com
Hello Brian,


I am getting casting error with the date field, as I recently switched from CF10 environment to Railo 4.2.
Application Environment: Railo 4.2 with Transfer latest version from GitHub, Coldspring and ModelGlue3

Any mapped field which has a type date is giving me error as below:
invalid call of the function setdateCreated (E:\inetpub\wwwroot\websites\asp052mysql\webapps\cache\transfer\portal.Portal$120B0C669E3739E83ED6F6F68AEF6704.transfer.cfm), first Argument (dateCreated) is of invalid type, can't cast Object type [Boolean] to a value of type [date]

This is property mentioned in Transfer.xml file
<property name="dateCreated" type="date" column="dateCreated" />

When I dump memento, it gives me this value for that property:
DB as null value in the column.

It seems the problem is in Transfer with Railo combination, because I didn't come across to that error before. Same kinda problem was reported in TrasferRailo mailing list in this thread

Brian G

unread,
Mar 7, 2015, 7:02:27 PM3/7/15
to transf...@googlegroups.com

I don't (yet) run Railo but this looks like a poor guess by Railo to determine the datatype in the returned query when (I suspect) the first row has a null.  I see this behavior in QoQ where it guesses wrong and causes problems.  I'm surprised it would happen with an actual query.

If you want to get some more info, open up that portal.Portal$...transfer.cfm file and try changing the argument type on setDateCreated() to be type "any" and do a <cfdump var="#arguments#" output="console" /> and see what you're getting vs. what it's expecting.

Brad Wood

unread,
Aug 3, 2015, 5:39:37 PM8/3/15
to transfer-dev
I think this issue may be related to https://github.com/TransferORM/transfer/issues/13 where the default value for properties is being ignored and always returned as "false".

Thanks!

~Brad
Reply all
Reply to author
Forward
0 new messages