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

Simple mysql select now(); Throws class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp #3496

Closed
lucasfcnunes opened this issue Mar 19, 2023 · 1 comment

Comments

@lucasfcnunes
Copy link

lucasfcnunes commented Mar 19, 2023

Guidelines

Please note that GitHub issues are only meant for bug reports/feature requests. If you have questions on how to use APOC, please ask on the Neo4j Discussion Forum instead of creating an issue here.

Expected Behavior (Mandatory)

Return now() correctly

Actual Behavior (Mandatory)

> neo4j$ CALL apoc.load.jdbc('mysql-db','select date(now());')
Neo.ClientError.Procedure.ProcedureCallFailed
Failed to invoke procedure `apoc.load.jdbc`: Caused by: java.lang.ClassCastException: class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp (java.time.LocalDateTime is in module java.base of loader 'bootstrap'; java.sql.Timestamp is in module java.sql of loader 'platform')

image

stack:

neo4j-neo4j-1     | 2023-03-19 14:22:22.838+0000 ERROR Cannot execute read result-set.
neo4j-neo4j-1     | Error:
neo4j-neo4j-1     | class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp (java.time.LocalDateTime is in module java.base of loader 'bootstrap'; java.sql.Timestamp is in module java.sql of loader 'platform')
neo4j-neo4j-1     | java.lang.ClassCastException: class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp (java.time.LocalDateTime is in module java.base of loader 'bootstrap'; java.sql.Timestamp is in module java.sql of loader 'platform')
neo4j-neo4j-1     |     at apoc.load.Jdbc$ResultSetIterator.convert(Jdbc.java:227) ~[apoc-5.5.0-extended.jar:5.5.0]
neo4j-neo4j-1     |     at apoc.load.Jdbc$ResultSetIterator.get(Jdbc.java:200) ~[apoc-5.5.0-extended.jar:5.5.0]
neo4j-neo4j-1     |     at apoc.load.Jdbc$ResultSetIterator.<init>(Jdbc.java:170) ~[apoc-5.5.0-extended.jar:5.5.0]
neo4j-neo4j-1     |     at apoc.load.Jdbc.executeQuery(Jdbc.java:83) ~[apoc-5.5.0-extended.jar:5.5.0]
neo4j-neo4j-1     |     at apoc.load.Jdbc.jdbc(Jdbc.java:66) ~[apoc-5.5.0-extended.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.kernel.impl.proc.GeneratedProcedure_jdbc83067985587350.apply(Unknown Source) ~[?:?]
neo4j-neo4j-1     |     at org.neo4j.procedure.impl.ProcedureRegistry.callProcedure(ProcedureRegistry.java:204) ~[neo4j-procedure-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.procedure.impl.GlobalProceduresRegistry.callProcedure(GlobalProceduresRegistry.java:310) ~[neo4j-procedure-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.kernel.impl.newapi.ProcedureCaller$ForTransactionScope.doCallProcedure(ProcedureCaller.java:269) ~[neo4j-kernel-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.kernel.impl.newapi.ProcedureCaller.callProcedure(ProcedureCaller.java:180) ~[neo4j-kernel-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.kernel.impl.newapi.AllStoreHolder.procedureCallRead(AllStoreHolder.java:912) ~[neo4j-kernel-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.CallSupport$.$anonfun$callReadOnlyProcedure$1(CallSupport.scala:50) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.CallSupport$.callProcedure(CallSupport.scala:85) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.CallSupport$.callReadOnlyProcedure(CallSupport.scala:50) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.TransactionBoundReadQueryContext.callReadOnlyProcedure(TransactionBoundQueryContext.scala:1398) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.planning.ExceptionTranslatingReadQueryContext.callReadOnlyProcedure(ExceptionTranslatingQueryContext.scala:266) ~[neo4j-cypher-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.LazyReadOnlyCallMode$.callProcedure(ProcedureCallMode.scala:62) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.pipes.ProcedureCallPipe.call(ProcedureCallPipe.scala:104) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.pipes.ProcedureCallPipe.$anonfun$internalCreateResultsByAppending$1(ProcedureCallPipe.scala:85) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.ClosingIterator$$anon$2.nextCur(ClosingIterator.scala:149) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.ClosingIterator$$anon$2.innerHasNext(ClosingIterator.scala:155) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.ClosingIterator.hasNext(ClosingIterator.scala:135) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.ClosingIterator$$anon$4.innerHasNext(ClosingIterator.scala:199) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.ClosingIterator.hasNext(ClosingIterator.scala:135) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.PipeExecutionResult.serveResults(PipeExecutionResult.scala:93) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.PipeExecutionResult.request(PipeExecutionResult.scala:78) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.result.StandardInternalExecutionResult.request(StandardInternalExecutionResult.scala:103) ~[neo4j-cypher-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.result.ClosingExecutionResult.request(ClosingExecutionResult.scala:149) ~[neo4j-cypher-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.fabric.stream.QuerySubject$BasicQuerySubject$1.doRequest(QuerySubject.java:155) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.fabric.stream.QuerySubject$BasicQuerySubject$1.request(QuerySubject.java:143) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.request(Operators.java:2305) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.StrictSubscriber.request(StrictSubscriber.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at org.neo4j.fabric.stream.Rx2SyncStream$RecordSubscriber.request(Rx2SyncStream.java:109) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.fabric.stream.Rx2SyncStream.maybeRequest(Rx2SyncStream.java:77) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.fabric.stream.Rx2SyncStream.readRecord(Rx2SyncStream.java:45) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.fabric.bolt.BoltQueryExecutionImpl$QueryExecutionImpl.request(BoltQueryExecutionImpl.java:151) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.transaction.AbstractCypherAdapterStream.handleRecords(AbstractCypherAdapterStream.java:96) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.transaction.result.ResultHandler.onPullRecords(ResultHandler.java:64) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.v40.messaging.result.PullResultConsumer.consume(PullResultConsumer.java:39) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.transaction.TransactionStateMachine$State.consumeResult(TransactionStateMachine.java:519) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.transaction.TransactionStateMachine$State$2.streamResult(TransactionStateMachine.java:372) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.transaction.TransactionStateMachine.streamResult(TransactionStateMachine.java:108) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.transaction.StatementProcessorTxManager.streamResults(StatementProcessorTxManager.java:226) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.transaction.StatementProcessorTxManager.pullData(StatementProcessorTxManager.java:117) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.v40.fsm.InTransactionState.processStreamPullResultMessage(InTransactionState.java:73) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.v40.fsm.AbstractStreamingState.processUnsafe(AbstractStreamingState.java:47) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.v40.fsm.InTransactionState.processUnsafe(InTransactionState.java:60) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.v40.fsm.FailSafeState.process(FailSafeState.java:45) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.fsm.AbstractStateMachine.nextState(AbstractStateMachine.java:136) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.fsm.AbstractStateMachine.process(AbstractStateMachine.java:96) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.lambda$submit$4(AtomicSchedulingConnection.java:112) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.executeJob(AtomicSchedulingConnection.java:335) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.doExecuteJobs(AtomicSchedulingConnection.java:269) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.executeJobs(AtomicSchedulingConnection.java:211) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
neo4j-neo4j-1     |     at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
neo4j-neo4j-1     |     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
neo4j-neo4j-1     |     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
neo4j-neo4j-1     |     at java.lang.Thread.run(Thread.java:833) ~[?:?]
neo4j-neo4j-1     | 2023-03-19 14:22:22.846+0000 ERROR Cannot execute SQL statement `select now();`.
neo4j-neo4j-1     | Error:
neo4j-neo4j-1     | Cannot execute read result-set.
neo4j-neo4j-1     | java.lang.RuntimeException: Cannot execute read result-set.
neo4j-neo4j-1     |     at apoc.load.Jdbc$ResultSetIterator.get(Jdbc.java:206) ~[apoc-5.5.0-extended.jar:5.5.0]
neo4j-neo4j-1     |     at apoc.load.Jdbc$ResultSetIterator.<init>(Jdbc.java:170) ~[apoc-5.5.0-extended.jar:5.5.0]
neo4j-neo4j-1     |     at apoc.load.Jdbc.executeQuery(Jdbc.java:83) ~[apoc-5.5.0-extended.jar:5.5.0]
neo4j-neo4j-1     |     at apoc.load.Jdbc.jdbc(Jdbc.java:66) ~[apoc-5.5.0-extended.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.kernel.impl.proc.GeneratedProcedure_jdbc83067985587350.apply(Unknown Source) ~[?:?]
neo4j-neo4j-1     |     at org.neo4j.procedure.impl.ProcedureRegistry.callProcedure(ProcedureRegistry.java:204) ~[neo4j-procedure-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.procedure.impl.GlobalProceduresRegistry.callProcedure(GlobalProceduresRegistry.java:310) ~[neo4j-procedure-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.kernel.impl.newapi.ProcedureCaller$ForTransactionScope.doCallProcedure(ProcedureCaller.java:269) ~[neo4j-kernel-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.kernel.impl.newapi.ProcedureCaller.callProcedure(ProcedureCaller.java:180) ~[neo4j-kernel-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.kernel.impl.newapi.AllStoreHolder.procedureCallRead(AllStoreHolder.java:912) ~[neo4j-kernel-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.CallSupport$.$anonfun$callReadOnlyProcedure$1(CallSupport.scala:50) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.CallSupport$.callProcedure(CallSupport.scala:85) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.CallSupport$.callReadOnlyProcedure(CallSupport.scala:50) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.TransactionBoundReadQueryContext.callReadOnlyProcedure(TransactionBoundQueryContext.scala:1398) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.planning.ExceptionTranslatingReadQueryContext.callReadOnlyProcedure(ExceptionTranslatingQueryContext.scala:266) ~[neo4j-cypher-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.LazyReadOnlyCallMode$.callProcedure(ProcedureCallMode.scala:62) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.pipes.ProcedureCallPipe.call(ProcedureCallPipe.scala:104) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.pipes.ProcedureCallPipe.$anonfun$internalCreateResultsByAppending$1(ProcedureCallPipe.scala:85) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.ClosingIterator$$anon$2.nextCur(ClosingIterator.scala:149) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.ClosingIterator$$anon$2.innerHasNext(ClosingIterator.scala:155) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.ClosingIterator.hasNext(ClosingIterator.scala:135) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.ClosingIterator$$anon$4.innerHasNext(ClosingIterator.scala:199) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.ClosingIterator.hasNext(ClosingIterator.scala:135) ~[neo4j-cypher-runtime-util-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.PipeExecutionResult.serveResults(PipeExecutionResult.scala:93) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.runtime.interpreted.PipeExecutionResult.request(PipeExecutionResult.scala:78) ~[neo4j-cypher-interpreted-runtime-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.result.StandardInternalExecutionResult.request(StandardInternalExecutionResult.scala:103) ~[neo4j-cypher-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.cypher.internal.result.ClosingExecutionResult.request(ClosingExecutionResult.scala:149) ~[neo4j-cypher-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.fabric.stream.QuerySubject$BasicQuerySubject$1.doRequest(QuerySubject.java:155) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.fabric.stream.QuerySubject$BasicQuerySubject$1.request(QuerySubject.java:143) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.request(Operators.java:2305) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at reactor.core.publisher.StrictSubscriber.request(StrictSubscriber.java:138) ~[reactor-core-3.5.1.jar:3.5.1]
neo4j-neo4j-1     |     at org.neo4j.fabric.stream.Rx2SyncStream$RecordSubscriber.request(Rx2SyncStream.java:109) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.fabric.stream.Rx2SyncStream.maybeRequest(Rx2SyncStream.java:77) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.fabric.stream.Rx2SyncStream.readRecord(Rx2SyncStream.java:45) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.fabric.bolt.BoltQueryExecutionImpl$QueryExecutionImpl.request(BoltQueryExecutionImpl.java:151) ~[neo4j-fabric-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.transaction.AbstractCypherAdapterStream.handleRecords(AbstractCypherAdapterStream.java:96) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.transaction.result.ResultHandler.onPullRecords(ResultHandler.java:64) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.v40.messaging.result.PullResultConsumer.consume(PullResultConsumer.java:39) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.transaction.TransactionStateMachine$State.consumeResult(TransactionStateMachine.java:519) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.transaction.TransactionStateMachine$State$2.streamResult(TransactionStateMachine.java:372) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.transaction.TransactionStateMachine.streamResult(TransactionStateMachine.java:108) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.transaction.StatementProcessorTxManager.streamResults(StatementProcessorTxManager.java:226) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.transaction.StatementProcessorTxManager.pullData(StatementProcessorTxManager.java:117) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.v40.fsm.InTransactionState.processStreamPullResultMessage(InTransactionState.java:73) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.v40.fsm.AbstractStreamingState.processUnsafe(AbstractStreamingState.java:47) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.v40.fsm.InTransactionState.processUnsafe(InTransactionState.java:60) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.v40.fsm.FailSafeState.process(FailSafeState.java:45) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.fsm.AbstractStateMachine.nextState(AbstractStateMachine.java:136) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.fsm.AbstractStateMachine.process(AbstractStateMachine.java:96) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.lambda$submit$4(AtomicSchedulingConnection.java:112) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.executeJob(AtomicSchedulingConnection.java:335) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.doExecuteJobs(AtomicSchedulingConnection.java:269) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.executeJobs(AtomicSchedulingConnection.java:211) ~[neo4j-bolt-5.5.0.jar:5.5.0]
neo4j-neo4j-1     |     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
neo4j-neo4j-1     |     at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
neo4j-neo4j-1     |     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
neo4j-neo4j-1     |     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
neo4j-neo4j-1     |     at java.lang.Thread.run(Thread.java:833) ~[?:?]
neo4j-neo4j-1     | Caused by: java.lang.ClassCastException: class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp (java.time.LocalDateTime is in module java.base of loader 'bootstrap'; java.sql.Timestamp is in module java.sql of loader 'platform')
neo4j-neo4j-1     |     at apoc.load.Jdbc$ResultSetIterator.convert(Jdbc.java:227) ~[apoc-5.5.0-extended.jar:5.5.0]
neo4j-neo4j-1     |     at apoc.load.Jdbc$ResultSetIterator.get(Jdbc.java:200) ~[apoc-5.5.0-extended.jar:5.5.0]
neo4j-neo4j-1     |     ... 63 more

How to Reproduce the Problem

Simple Dataset (where it's possibile)

//Insert here a set of Cypher statements that helps us to reproduce the problem
CALL apoc.load.jdbc('mysql-db','select date(now());')

Steps (Mandatory)

  1. docker compose up with mysql:8.0.31 and neo4j:5.5.0 (plugins down below)
# ./conf/apoc.conf
apoc.jdbc.mysql-db.url=jdbc:mysql://mysql-db:3306/data?user=root&password=root
  1. CALL apoc.load.jdbc('mysql-db','select now();')

Screenshots (where it's possibile)

./compose.yaml
image

./plugins/
image

Specifications (Mandatory)

Currently used versions

Versions

@gem-neo4j
Copy link
Contributor

Thank you for reporting this :) I have made a bug ticket for the team

@jexp jexp moved this to Todo in APOC Extended Larus Sep 21, 2023
@vga91 vga91 moved this from Todo to In Progress in APOC Extended Larus Jan 10, 2024
@vga91 vga91 moved this from In Progress to Review in APOC Extended Larus Jan 17, 2024
vga91 added a commit that referenced this issue Feb 29, 2024
…ateTime cannot be cast to class java.sql.Timestamp
vga91 added a commit that referenced this issue Mar 14, 2024
…ateTime cannot be cast to class java.sql.Timestamp
vga91 added a commit that referenced this issue Mar 15, 2024
…ateTime cannot be cast to class java.sql.Timestamp
RobertoSannino pushed a commit that referenced this issue Mar 19, 2024
…ateTime cannot be cast to class java.sql.Timestamp (#3975)

* Fixes #3496: Simple mysql select now(); Throws class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp

* Fix tests and updated implementation package

* Removed unused imports

* Fixed mysql test
@github-project-automation github-project-automation bot moved this from Review to Done in APOC Extended Larus Mar 19, 2024
vga91 added a commit that referenced this issue Apr 3, 2024
….LocalDateTime cannot be cast to class java.sql.Timestamp (#3975)

* Fixes #3496: Simple mysql select now(); Throws class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp

* Fix tests and updated implementation package

* Removed unused imports

* Fixed mysql test
@vga91 vga91 moved this from Done to Cherry-picked in APOC Extended Larus May 9, 2024
vga91 added a commit that referenced this issue Sep 10, 2024
….LocalDateTime cannot be cast to class java.sql.Timestamp (#3975)

* Fixes #3496: Simple mysql select now(); Throws class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp

* Fix tests and updated implementation package

* Removed unused imports

* Fixed mysql test
vga91 added a commit that referenced this issue Dec 5, 2024
….LocalDateTime cannot be cast to class java.sql.Timestamp (#3975)

* Fixes #3496: Simple mysql select now(); Throws class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp

* Fix tests and updated implementation package

* Removed unused imports

* Fixed mysql test
vga91 added a commit that referenced this issue Dec 16, 2024
….LocalDateTime cannot be cast to class java.sql.Timestamp (#3975)

* Fixes #3496: Simple mysql select now(); Throws class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp

* Fix tests and updated implementation package

* Removed unused imports

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

No branches or pull requests

3 participants