This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difficulty assigning Java Util Date to TemporalType field in Entity Bean

 
Jack Bush
Ranch Hand
Posts: 235
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Edvins Reisons
Ranch Hand
Posts: 364
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Edvins,

Thanks for your advice which has resolved this issue.

Jack
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic