• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difficulty assigning Java Util Date to TemporalType field in Entity Bean

 
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have getting the following syntax/compilation error (line 5, 6 below) when trying to enter the system date to Temporal Type:

setCollectionDate(java.util.Date) in domain.Customer cannot be applied to (java.lang.String).


I am running JDK 1.6.0_10, Glassfish v2r2, MySQL 5.0, Netbeans 6.1 on Windows XP platform.

I have also posted this question on http://forums.sun.com/thread.jspa?threadID=5338230 as well.

Any assistance would be much appreciated.

Thanks in advance,

Jack
 
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The format method returns a String, which you cannot put into a Date field.
I think you need to use a Date without formatting it.
 
Jack Bush
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Edvins,

Thanks for your advice which has resolved this issue.

Jack
reply
    Bookmark Topic Watch Topic
  • New Topic