Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Coldfusion to Java date issue

New Here ,
May 19, 2008 May 19, 2008
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
TOPICS
Advanced techniques
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 19, 2008 May 19, 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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 20, 2008 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 20, 2008 May 20, 2008
akhurana wrote:
> 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.

not sure i'm following, java epoch offsets *are* dates (to java). in any case if
that app is looking for date strings, just use dateFormat() on it.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 20, 2008 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 20, 2008 May 20, 2008
LATEST
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>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources