Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConversionException when upgrading from 3.8.11.2 to 3.20.1 #296

Closed
benallard opened this issue Nov 20, 2017 · 5 comments
Closed

ConversionException when upgrading from 3.8.11.2 to 3.20.1 #296

benallard opened this issue Nov 20, 2017 · 5 comments

Comments

@benallard
Copy link

3.8.11.2 is working fine. When I upgrade, I get this error:

javax.persistence.PersistenceException: Exception [EclipseLink-3005] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.ConversionException
Exception Description: Incorrect timestamp format: [1486332000000] (expected [YYYY-MM-DD HH:MM:SS.NNNNNNNNN])
	at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:491)
	at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.orm.jpa.SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:372)
	at com.sun.proxy.$Proxy39.getResultList(Unknown Source)
	at com.querydsl.jpa.impl.AbstractJPAQuery.getResultList(AbstractJPAQuery.java:160)
	at com.querydsl.jpa.impl.AbstractJPAQuery.fetch(AbstractJPAQuery.java:202)
        at myCode ...
...
Caused by: Exception [EclipseLink-3005] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.ConversionException
Exception Description: Incorrect timestamp format: [1486332000000] (expected [YYYY-MM-DD HH:MM:SS.NNNNNNNNN])
	at org.eclipse.persistence.exceptions.ConversionException.incorrectTimestampFormat(ConversionException.java:139)
	at org.eclipse.persistence.internal.helper.Helper.timestampFromString(Helper.java:2048)
	at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToTimestamp(ConversionManager.java:757)
	at org.eclipse.persistence.internal.helper.ConversionManager.convertObject(ConversionManager.java:112)
	at org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.convertObject(DatasourcePlatform.java:203)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.getObjectThroughOptimizedDataConversion(DatabaseAccessor.java:1386)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:1271)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.fetchRow(DatabaseAccessor.java:1080)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processResultSet(DatabaseAccessor.java:772)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:661)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:564)
	at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2093)
	at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:600)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:270)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:256)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:327)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:722)
	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2740)
	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2693)
	at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:563)
	at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1221)
	at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:911)
	at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1180)
	at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:464)
	at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1268)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2979)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1892)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1874)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839)
	at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:260)
	at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:480)
	... 56 more

Might well be related to #88, not sure about that though.

This happens when running my tests in a :memory: database, so no migration of older data is involved here.

@benallard
Copy link
Author

benallard commented Nov 20, 2017

3.21.0 still has the issue.
3.8.11.2 is the last working release(3.14.2 has the issue).

@benallard
Copy link
Author

Downgrading eclipse.persistence did solve the Issue as well, and allows me to use 3.21.0. So I'm not really sure who's the culprit there.

@gschnepp
Copy link

While I'm not working with SQLite I'm hit by the same problem with a PostgreSQL database. So I'd say this is a problem with Eclipselink 2.7.0. Downgrade to 2.6.5 worked for me, too. For reference: https://bugs.eclipse.org/bugs/show_bug.cgi?id=522408

@schemacrawler
Copy link
Collaborator

@benallard - Please close this issue, since it seem related to the SQLite JDBC driver. Thanks.

@benallard
Copy link
Author

Fair enough, closing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants