-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: MySql Date problem
PostPosted: Tue Jan 05, 2010 2:41 pm 
Newbie

Joined: Tue Jan 05, 2010 2:33 pm
Posts: 15
I have a mapping to a date column in a MySQL DB. I am submitting a form using struts 2 and every time I try to update the object in the DB I get this error :

ognl.OgnlException: source is null for getProperty(null, "employee")
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1638)
at ognl.ASTProperty.getValueBody(ASTProperty.java:92)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTChain.setValueBody(ASTChain.java:168)

The date in the struts 2 form looks like this : 2010-01-05

It is a Date java object in the form bean.

The update does not appear to have taken place. However if I restart my tomcat server and view the form the update will now be in place.

I have done some tests and have set the Date as a new Date() just before the update line in my DAO. result is the same.

I am using MySQL 5.1.41 on Linux. and Hibernate 3.

Any ideas???

Thanks in advance

Spunog


Top
 Profile  
 
 Post subject: Re: MySql Date problem
PostPosted: Wed Jan 06, 2010 2:40 am 
Newbie

Joined: Wed Jan 06, 2010 2:30 am
Posts: 5
Hi,
I think in the "employee" field there's an errors, are you sure this field had the right value, do you set this field is " not null"? Check and give me the datails.

_________________
Hibernate guides developer for marketing, It's powerful.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.