I am trying to pass a date field into a table. The column is of sql timestamp and I keep getting the runtime exception
java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff] at
java.sql.Timestamp.valueOf(Timestamp.java:235)
at kafkaTest.TruckScheme.deserialize(TruckScheme.java:51)
at backtype.storm.spout.SchemeAsMultiScheme.deserialize(SchemeAsMultiScheme.java:33)
at storm.kafka.KafkaUtils.generateTuples(KafkaUtils.java:189)
at storm.kafka.PartitionManager.next(PartitionManager.java:121) at storm.kafka.KafkaSpout.nextTuple(KafkaSpout.java:124)
at backtype.storm.daemon.executor$fn__4949$fn__4964$fn__4993.invoke(executor.clj:585)
at backtype.storm.util$async_loop$fn__452.invoke(util.clj:465)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Thread.java:745)
I tried to format it using SimpleFateFormat
but I am still getting the same error.
Is there any way to get the java date format to comply with the exact format that of the sql timestamp type?
Thanks. Piyush