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
Win a copy of
Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework
this week in the
Java in General
forum!
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
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
Struts
date mapping problem in Hibernet
Vaishali Paramane
Ranch Hand
Posts: 107
posted 13 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 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Maybe
you should
post what you wrote in you Main() method.
I found some pretty shells, some sea glass and this lovely tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
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...