nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koji Kawamura <ijokaruma...@gmail.com>
Subject Re: NiFi ExecuteSQL error => can not be represented as java.sql.Timestamp
Date Tue, 07 Nov 2017 23:29:54 GMT
Hi Mohit,

The exception looks as if the entire string ' 821725069 2161514622096
...  0-00 0                       3' was converted to
java.sql.Timestamp.
Would you share your create table DDL statement, few sample record
data, NiFi, MySQL and JDBC driver version you're using?

Thanks,
Koji

On Wed, Nov 8, 2017 at 1:14 AM,  <mohit.jain@open-insights.co.in> wrote:
> 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 '               821725069 2161514622096
>
> ________________________________
> 001[1]20 18248217
> 233243264523
> 2332442942490
> 00233244294249  004217 2017-05-01 00:42:17[1]65 N 62001-404-282360 11    1
> 0000-00-00 00:00:00
> 01079211655171    0 62001-404-28236
>
> -10.751025
>
> -10.751025 0.270833 6.729165 6.458332[1]96 0.2708331 00
>
> ________________________________
> 404
> 0023324429420[1]650   [1]10220
> 24326452301CS1plus_V.1.0@ericsson.comCore_Context_R1A@ericsson.com
> 8-1007175176-0846083c 20170501
> 233243264523 2017-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(StandardProcessSession.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(StandardProcessorNode.java:1119)
>
>                at
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
>
>                at
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
>
>                at
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.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(ScheduledThreadPoolExecutor.java:294)
>
>                at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>
>                at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>
>                at java.lang.Thread.run(Thread.java:748)
>
> Caused by: java.sql.SQLException: Value '               821725069
> 2161514622096
>
> ________________________________
> 001[1]20 18248217
> 233243264523
> 2332442942490
> 00233244294249  004217 2017-05-01 00:42:17[1]65 N 62001-404-282360 11    1
> 0000-00-00 00:00:00
> 01079211655171    0 62001-404-28236
>
> -10.751025
>
> -10.751025 0.270833 6.729165 6.458332[1]96 0.2708331 00
>
> ________________________________
> 404
> 0023324429420[1]650   [1]10220
> 24326452301CS1plus_V.1.0@ericsson.comCore_Context_R1A@ericsson.com
> 8-1007175176-0846083c 20170501
> 233243264523 2017-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.java:325)
>
>                at
> org.apache.commons.dbcp.DelegatingResultSet.getObject(DelegatingResultSet.java:325)
>
>                at
> org.apache.nifi.processors.standard.util.JdbcCommon.convertToAvroStream(JdbcCommon.java:322)
>
>                at
> org.apache.nifi.processors.standard.ExecuteSQL$2.process(ExecuteSQL.java:218)
>
>                ... 14 common frames omitted
>
>
>
> Kindly help.
>
>
>
> Regards,
>
> Mohit Jain

Mime
View raw message