Foros de discusión

Data truncation: Incorrect datetime value: '1251136551293

thumbnail
Gabriel Leon Leyva, modificado hace 14 años.

Data truncation: Incorrect datetime value: '1251136551293

Regular Member Mensajes: 243 Fecha de incorporación: 20/06/09 Mensajes recientes
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)
thumbnail
Yongming Duan, modificado hace 14 años.

RE: Data truncation: Incorrect datetime value: '1251136551293

Regular Member Mensajes: 213 Fecha de incorporación: 15/10/07 Mensajes recientes
Maybe this:

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

Try checking your operating system timezone settings.
thumbnail
Gabriel Leon Leyva, modificado hace 14 años.

RE: Data truncation: Incorrect datetime value: '1251136551293

Regular Member Mensajes: 243 Fecha de incorporación: 20/06/09 Mensajes recientes
I' still getting the same error did somebody had the same problem? what's the fix please..? thanks in advance
Mudasar Kalwar, modificado hace 11 años.

RE: Data truncation: Incorrect datetime value: '1251136551293

New Member Mensajes: 23 Fecha de incorporación: 13/09/12 Mensajes recientes
Hi , I am also getting the same error, what's going wrong ? can any one has idea ?
Konstantin Surzhin, modificado hace 11 años.

RE: Data truncation: Incorrect datetime value: '1251136551293

New Member Mensajes: 8 Fecha de incorporación: 21/01/12 Mensajes recientes
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, modificado hace 11 años.

RE: Data truncation: Incorrect datetime value: '1251136551293

New Member Mensajes: 23 Fecha de incorporación: 13/09/12 Mensajes recientes
Hi all, I solve it emoticon
Roberto Tellado, modificado hace 11 años.

RE: Data truncation: Incorrect datetime value: '1251136551293

Regular Member Mensajes: 245 Fecha de incorporación: 15/09/09 Mensajes recientes
How?
Mudasar Kalwar, modificado hace 11 años.

RE: Data truncation: Incorrect datetime value: '1251136551293

New Member Mensajes: 23 Fecha de incorporación: 13/09/12 Mensajes recientes
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