Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
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:
Tim Cooke
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Liutauras Vilda
Sheriffs:
Rob Spoor
Junilu Lacar
paul wheaton
Saloon Keepers:
Stephan van Hulst
Tim Moores
Tim Holloway
Carey Brown
Scott Selikoff
Bartenders:
Piet Souris
Jj Roberts
fred rosenberger
Forum:
Struts
date mapping problem in Hibernet
Vaishali Paramane
Ranch Hand
Posts: 107
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi
I created table in oracle
Create table telUserLogin(userId number, username varchar2(20), password varchar2(16), firstName varchar2(50), lastName varchar2(50), address varchar2(100), sex varchar2(5), dob date, emaiId varchar2(50), accountType varchar2(15)); Login.java public class Login { int userid ; String username ; String password ; String firstname; String lastname ; String address; String sex ; Date dob ; String emailid; String accounttype; public Date getDob() { return dob; } public void setDob(Date dob) { this.dob = dob; } ---- all getXXX() setXXX() methods } Login.hbm.xml <hibernate-mapping> <class name="Login" table="TELUSERLOGIN" schema="SYSTEM"> <id name="userid" type="java.lang.Integer"> <column name="USERID" precision="22" scale="0" /> <generator class="assigned"></generator> </id> othe propertyes.... <property name="dob" type="java.util.Date" column ="DOB" length="7" /> </class> </hibernate-mapping>
after running this programm I am getting error
Exception in
thread
"main" java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
is anything wrong in mapping?
SCJP, SCJD
Preparing for SCWCD
Manuel Schenkhuizen
Greenhorn
Posts: 14
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Maybe
you should
post what you wrote in you Main() method.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Caching Issues with Hibnernate
Hibernate, User and Address with association table between
Hibernate Repeated column mapping problem
Hibernate Mapping (Many-To-One Association). Problem. This forum is my last hope.
Hibernate inserting man-to-one fails
More...