Skip to main content
Participant
May 19, 2008
Question

Coldfusion to Java date issue

  • May 19, 2008
  • 3 replies
  • 1229 views
I am sending a date to a customers weblogic code which is throwing this error. I need help converting a date entered on a form to the java date format.

weblogic.jms.common.JMSException: Error deserializing object
at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:144)
at com.xxx.iag.billing.framework.server.ServerMessageHandler.onMessage(ServerMessageHandler.java:349)
at com.xxx.iag.billing.framework.server.ServerMessageHandler.run(ServerMessageHandler.java:405)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassNotFoundException: coldfusion.runtime.OleDateTime
This topic has been closed for replies.

3 replies

Inspiring
May 21, 2008
akhurana wrote:
> hnmReq.setDate("DateFrom", new Date(fromDate));
> where the fromDate variable is set to just a date in this format: mm/dd/yy:

where fromDate is a string? if so that's old java Date(). did you try the java
epoch offsets?

> Their dump shows the value set to this format: [ Tue May 20 00:00:00 EDT 2008
> ] for 05/20/2008

while i think the java epoch should work, you can create a dateFormat mask to
replicate that:

"ddd mmm dd 00:00:00 EDT yyyy"

i guess you might also try creating a java Date() & passing that to it:

<cfscript>
now=now().getTime();
aDate=createObject("java","java.util.Date").init(now);
</cfscript>
akhuranaAuthor
Participant
May 20, 2008
Paul,
Their sample code does this:

hnmReq.setDate("DateFrom", new Date(fromDate));
where the fromDate variable is set to just a date in this format: mm/dd/yy:

Their dump shows the value set to this format: [ Tue May 20 00:00:00 EDT 2008 ] for 05/20/2008

I need to get this done in coldfusion. The "LONG" format does not give the date/time in the format above and they see the java.lang.ClassNotFoundException: coldfusion.runtime.OleDateTime

error on their end.

Ankush

Inspiring
May 20, 2008
akhurana wrote:
> I am sending a date to a customers weblogic code which is throwing this error.
> I need help converting a date entered on a form to the java date format.
>
> weblogic.jms.common.JMSException: Error deserializing object
> at
> weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:144)
> at
> com.xxx.iag.billing.framework.server.ServerMessageHandler.onMessage(ServerMessag
> eHandler.java:349)
> at
> com.xxx.iag.billing.framework.server.ServerMessageHandler.run(ServerMessageHandl
> er.java:405)
> at java.lang.Thread.run(Thread.java:534)
> Caused by: java.lang.ClassNotFoundException: coldfusion.runtime.OleDateTime


if it can handle java epoch offset, you can try getTime()

yourDateVar.getTime()

it's not documented btw.
akhuranaAuthor
Participant
May 20, 2008
Paul,
I need to send in fixed dates (start and end), so epoch is not really an option and the formats need to be "mm/dd/yyyy". Any help at this point will be really helpful.

Ankush