sudhakar_koundinya
asked on
java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date
Hi
While working with mysql and JSF,I got the exception. how to resolve this??
Thanks
Sudhakar
While working with mysql and JSF,I got the exception. how to resolve this??
Thanks
Sudhakar
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There seems to be a fair amount on google for this. It appears that if you are trying to set an empty value it will throw this error.
Looks like you need to validate the date before entry.
Looks like you need to validate the date before entry.
ASKER
I have done a silly mistake. I haven't seen other table data. It is set to 0000-00-00
Take your points :)
Take your points :)
You probably have dates in the database that are 00/00/0000 00:00:00 which cannot be represented in Java. Issue a Update statement that changes them to null:
Update table set dateField = null
where dateField = '00/00/00 00:00:00'
Update table set dateField = null
where dateField = '00/00/00 00:00:00'
ASKER
Guys,
Do you have any working knowledge on Java Server Faces. So that I can ask some questions on JSF??
Thanks
Sudhakar
Do you have any working knowledge on Java Server Faces. So that I can ask some questions on JSF??
Thanks
Sudhakar
>>Take your points :)
Thanks. It was probably one of those things that we all do from time to time :-)
>>Do you have any working knowledge on Java Server Faces. So that I can ask some questions on JSF??
only in prototyping stuff. Most of the stuff I do is in Struts, JSTL and other jakarta projects...
Thanks. It was probably one of those things that we all do from time to time :-)
>>Do you have any working knowledge on Java Server Faces. So that I can ask some questions on JSF??
only in prototyping stuff. Most of the stuff I do is in Struts, JSTL and other jakarta projects...
I worked on a small JSF project and read up on it. Ask away!
ASKER
Guys,
Can you help me here
https://www.experts-exchange.com/questions/21424314/Sharing-Data-between-Pages-using-Action-Link-component.html
https://www.experts-exchange.com/questions/21424315/How-to-save-the-data-in-Java-Server-faces.html
https://www.experts-exchange.com/questions/21424320/How-to-save-and-fetch-the-images-in-Java-Server-Faces.html
https://www.experts-exchange.com/questions/21424321/How-to-share-data-between-Java-Server-Faces-and-normal-JSPs-Servlets.html
Can you help me here
https://www.experts-exchange.com/questions/21424314/Sharing-Data-between-Pages-using-Action-Link-component.html
https://www.experts-exchange.com/questions/21424315/How-to-save-the-data-in-Java-Server-faces.html
https://www.experts-exchange.com/questions/21424320/How-to-save-and-fetch-the-images-in-Java-Server-Faces.html
https://www.experts-exchange.com/questions/21424321/How-to-share-data-between-Java-Server-Faces-and-normal-JSPs-Servlets.html
ASKER
I am not getting any exception in first page. while navigating to second page I am getting this error
jiya_providerRowSet.setDat
jiya_providerRowSet.setCom
Regards
Sudhakar