Setup on mysql


#1

I use all windows x86 32 bit:
java 1.8.0_152; apache-tomcat-8.5.37; mysql-5.7.24;
on first tomcat startup ihave many:
java.lang.RuntimeException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
at com.axelor.auth.AuditableRunner.run(AuditableRunner.java:63)
at com.axelor.meta.loader.ModuleManager.initialize(ModuleManager.java:103)
at com.axelor.web.AppInitializer.init(AppInitializer.java:55)

Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:147)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155)
at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1423)
at org.hibernate.query.Query.getResultList(Query.java:146)

Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
at org.hibernate.loader.Loader.doList(Loader.java:2618)

Caused by: java.sql.SQLException: Cannot convert value ‘2019-01-13 11:11:51.000000’ from column 7 to TIMESTAMP.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)

Caused by: java.lang.IllegalArgumentException: nanos > 999999999 or < 0
at java.sql.Timestamp.setNanos(Timestamp.java:389)
at com.mysql.jdbc.TimeUtil.fastTimestampCreate(TimeUtil.java:1156)
at com.mysql.jdbc.ResultSetImpl.fastTimestampCreate(ResultSetImpl.java:1057)
at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1328)


#2

Hi,

It seams to be a compatibility problem with timestamp field. Which version of Mysql and driver do u use ?
Is it not possible for u to use Postgres instead ?

Regards,


#3

java 1.8.0_152; apache-tomcat-8.5.37; mysql-5.7.24; mysql-connector-java-5.1.41.jar; axelor-erp-5.0.2.war.
I’m testing axelor with other people (same vesion but on Linux OS) and i work with Windows, i need to test the same tools;
tanks.


#4

You are using the lastest 5 release (db and driver) so normally it should work. I never test with Mysql so i’m sorry to not be able to help you more. Maybe someone else in this forum could do.