Hi all,

 

I'm facing issue while fetching records from mysql table with Timestamp
column. Table has 4 timestamp columns. It is working fine when I change the
data type to string.

 

It throws the following exception :

 

org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException:
Value '               8217250692161514622096

  _____  

001[1]2018248217
233243264523 
2332442942490 
00233244294249  0042172017-05-01 00:42:17[1]65 N 62001-404-282360 11
10000-00-00 00:00:00      
01079211655171    0 62001-404-28236  

-10.751025

-10.7510250.2708336.7291656.458332[1]960.2708331 00

  _____  

404     
0023324429420[1]650   [1]10220
24326452301CS1plus_V.1.0@ericsson.comcore_context_...@ericsson.com8-1007175
176-0846083c20170501
2332432645232017-05-01
19:37:061CCNCDR44-ASCCN8_03-Blk65536Blk-2360-20170501-3841
  _____  

614[1]410
010792116551710
  _____  

0-00 0                       3 ' can not be represented as
java.sql.Timestamp

               at
org.apache.nifi.processors.standard.ExecuteSQL$2.process(ExecuteSQL.java:220
)

               at
org.apache.nifi.controller.repository.StandardProcessSession.write(StandardP
rocessSession.java:2570)

               at
org.apache.nifi.processors.standard.ExecuteSQL.onTrigger(ExecuteSQL.java:206
)

               at
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java
:27)

               at
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessor
Node.java:1119)

               at
org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(Continuall
yRunProcessorTask.java:147)

               at
org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(Continuall
yRunProcessorTask.java:47)

               at
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(Timer
DrivenSchedulingAgent.java:128)

               at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

               at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)

               at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$
301(ScheduledThreadPoolExecutor.java:180)

               at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Sch
eduledThreadPoolExecutor.java:294)

               at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
49)

               at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
24)

               at java.lang.Thread.run(Thread.java:748)

Caused by: java.sql.SQLException: Value '
8217250692161514622096

  _____  

001[1]2018248217
233243264523 
2332442942490 
00233244294249  0042172017-05-01 00:42:17[1]65 N 62001-404-282360 11
10000-00-00 00:00:00      
01079211655171    0 62001-404-28236  

-10.751025

-10.7510250.2708336.7291656.458332[1]960.2708331 00

  _____  

404     
0023324429420[1]650   [1]10220
24326452301CS1plus_V.1.0@ericsson.comcore_context_...@ericsson.com8-1007175
176-0846083c20170501
2332432645232017-05-01
19:37:061CCNCDR44-ASCCN8_03-Blk65536Blk-2360-20170501-3841
  _____  

614[1]410
010792116551710
  _____  

0-00 0                       3 ' can not be represented as
java.sql.Timestamp

               at
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)

               at
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:897)

               at
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:886)

               at
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)

               at
com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:937)

               at
com.mysql.jdbc.BufferRow.getTimestampFast(BufferRow.java:559)

               at
com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:5918)

               at
com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:5588)

               at
com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4549)

               at
org.apache.commons.dbcp.DelegatingResultSet.getObject(DelegatingResultSet.ja
va:325)

               at
org.apache.commons.dbcp.DelegatingResultSet.getObject(DelegatingResultSet.ja
va:325)

               at
org.apache.nifi.processors.standard.util.JdbcCommon.convertToAvroStream(Jdbc
Common.java:322)

               at
org.apache.nifi.processors.standard.ExecuteSQL$2.process(ExecuteSQL.java:218
)

               ... 14 common frames omitted

 

Kindly help.

 

Regards,

Mohit Jain

Reply via email to