databus icon indicating copy to clipboard operation
databus copied to clipboard

Mysql example exception: Bad key type: java.math.BigInteger

Open dengshenyu opened this issue 8 years ago • 1 comments

Hi, when I execute the mysql example following wiki "Databus for MySQL", I met an exception below:

com.linkedin.databus.core.DatabusRuntimeException: com.linkedin.databus2.core.DatabusException: com.linkedin.databus.core.UnsupportedKeyException: Bad key type: java.math.BigInteger at com.linkedin.databus2.producers.ORListener.endXtion(ORListener.java:242) at com.linkedin.databus2.producers.ORListener.run(ORListener.java:761) Caused by: com.linkedin.databus2.core.DatabusException: com.linkedin.databus.core.UnsupportedKeyException: Bad key type: java.math.BigInteger at com.linkedin.databus2.producers.OpenReplicatorEventProducer$EventProducerThread.onEndTransaction(OpenReplicatorEventProducer.java:486) at com.linkedin.databus2.producers.ORListener.endXtion(ORListener.java:238) ... 1 more Caused by: com.linkedin.databus.core.UnsupportedKeyException: Bad key type: java.math.BigInteger at com.linkedin.databus.core.DbusEventKey.(DbusEventKey.java:126) at com.linkedin.databus2.producers.OpenReplicatorAvroEventFactory.createAndAppendEvent(OpenReplicatorAvroEventFactory.java:101) at com.linkedin.databus2.producers.OpenReplicatorEventProducer$EventProducerThread.addTxnToBuffer(OpenReplicatorEventProducer.java:544) at com.linkedin.databus2.producers.OpenReplicatorEventProducer$EventProducerThread.onEndTransaction(OpenReplicatorEventProducer.java:480) ... 2 more

And this is the MySQL environment:

siters-MacBook-Pro:distributions shenyuan$ mysql --version --help mysql Ver 14.14 Distrib 5.6.23, for osx10.8 (x86_64) using EditLine wrapper

I found it is because the bigint type of id column in the table defined in create_person.sql, and this exception is gone after I replace the bigint with int in create_person.sql.

Hope it helps.

dengshenyu avatar May 10 '17 11:05 dengshenyu

https://github.com/linkedin/databus/pull/98/files you can merge this branch

buptyzc avatar May 27 '17 06:05 buptyzc