Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Gabriel Leon Leyva
Data truncation: Incorrect datetime value: '1251136551293
August 24, 2009 10:54 AM
Answer

Gabriel Leon Leyva

Rank: Regular Member

Posts: 239

Join Date: June 20, 2009

Recent Posts

What could be the couse of this error..?

thanks

at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at com.liferay.portal.dao.orm.hibernate.LiferaySession.flush(LiferaySession.java:176)
at com.liferay.portal.dao.orm.hibernate.SessionImpl.flush(SessionImpl.java:118)
... 228 more
Caused by: java.sql.BatchUpdateException: Data truncation: Incorrect datetime value: '1251136551293' for column 'createDate' at row 1
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1257)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:943)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
Arcko Duan
RE: Data truncation: Incorrect datetime value: '1251136551293
August 24, 2009 3:25 PM
Answer

Arcko Duan

Rank: Regular Member

Posts: 202

Join Date: October 15, 2007

Recent Posts

Maybe this:

http://bugs.mysql.com/bug.php?id=22695

Try checking your operating system timezone settings.
Gabriel Leon Leyva
RE: Data truncation: Incorrect datetime value: '1251136551293
October 21, 2009 3:33 PM
Answer

Gabriel Leon Leyva

Rank: Regular Member

Posts: 239

Join Date: June 20, 2009

Recent Posts

I' still getting the same error did somebody had the same problem? what's the fix please..? thanks in advance
Mudasar Kalwar
RE: Data truncation: Incorrect datetime value: '1251136551293
October 7, 2012 10:54 PM
Answer

Mudasar Kalwar

Rank: New Member

Posts: 23

Join Date: September 13, 2012

Recent Posts

Hi , I am also getting the same error, what's going wrong ? can any one has idea ?
Konstantin Surzhin
RE: Data truncation: Incorrect datetime value: '1251136551293
October 9, 2012 8:49 AM
Answer

Konstantin Surzhin

Rank: New Member

Posts: 8

Join Date: January 20, 2012

Recent Posts

package timez;

import java.sql.Timestamp;
import java.util.Date;
import java.util.TimeZone;

/**
*
* @author pl
*/
public class Timez {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String[] tzs = TimeZone.getAvailableIDs();
for (String t : tzs) {
TimeZone tz = TimeZone.getTimeZone(t);

TimeZone.setDefault(tz);

Date date = new java.util.Date(1251136551293L);
System.out.println(new Timestamp(date.getDate()) + " : " + t);

//A timestamp. The range is '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07'
//UTC. TIMESTAMP values are stored as the number of seconds since the epoch ('1970-01-01 00:00:00' UTC).
//A TIMESTAMP cannot represent the value '1970-01-01 00:00:00' because that is equivalent to 0 seconds from
//the epoch and the value 0 is reserved for representing '0000-00-00 00:00:00', the “zero” TIMESTAMP value.
}
}
}

1969-12-31 12:00:00.024 : Etc/GMT+12
1969-12-31 13:00:00.024 : Etc/GMT+11
.....
.....
Mudasar Kalwar
RE: Data truncation: Incorrect datetime value: '1251136551293
October 13, 2012 12:59 PM
Answer

Mudasar Kalwar

Rank: New Member

Posts: 23

Join Date: September 13, 2012

Recent Posts

Hi all, I solve it emoticon
Roberto Tellado
RE: Data truncation: Incorrect datetime value: '1251136551293
October 17, 2012 3:56 AM
Answer

Roberto Tellado

Rank: Regular Member

Posts: 244

Join Date: September 15, 2009

Recent Posts

How?
Mudasar Kalwar
RE: Data truncation: Incorrect datetime value: '1251136551293
October 17, 2012 5:42 AM
Answer

Mudasar Kalwar

Rank: New Member

Posts: 23

Join Date: September 13, 2012

Recent Posts

Roberto Tellado:
How?



Hi Roberto

open you database and go to socialactivity table , alter it and make the createDate as bigint (in my case I set up bigInt(75) ). and after doing that make sure enter some date in that table so that it will work in my case I run UPDATE socialactivity SET createDate = '1349247129364';.
It will solve the problem.

Thanks