我下载的canal.adapter1.1.2,准备做es同步,但是启动后不会同步,并且8081端口没有开启,日志文件提示是
Exception in thread "main" java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.context.ApplicationContextInitializer : org.springframework.boot.autoconfigure.SharedMetadataReaderFactoryContextInitializer at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:448) at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:427) at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:418) at org.springframework.boot.SpringApplication.(SpringApplication.java:266) at org.springframework.boot.SpringApplication.(SpringApplication.java:247) at com.alibaba.otter.canal.adapter.launcher.CanalAdapterApplication.main(CanalAdapterApplication.java:17) Caused by: java.lang.NoClassDefFoundError: org/springframework/core/KotlinDetector at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:169) at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:444) ... 5 more Caused by: java.lang.ClassNotFoundException: org.springframework.core.KotlinDetector at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
配置文件如下
server: port: 80811 logging: level: org.springframework: WARN com.alibaba.otter.canal.client.adapter.hbase: DEBUG com.alibaba.otter.canal.client.adapter.es: DEBUG com.alibaba.otter.canal.client.adapter.rdb: DEBUG spring: jackson: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8 default-property-inclusion: non_null canal.conf: canalServerHost: 127.0.0.1:11111
batchSize: 500 syncBatchSize: 1000 retries: 0 timeout:
mode: tcp srcDataSources: defaultDS: url: jdbc:mysql://mydb.mysql.rds.aliyuncs.com:3306/mydb?useUnicode=true username: test password: test_1234xxxxxxx canalAdapters: - instance: example # canal instance Name or mq topic name groups: - groupId: g1 outerAdapters: - name: es hosts: 100.66.222.xxx:9300 properties: cluster.name: my-test
es 配置
dataSourceKey: defaultDS destination: example esMapping: _index: my_index _type: product _id: _id
sql: "SELECT p.id as _id, p.id as id, p.category_id, p.name FROM product p"
etlCondition: "" commitBatch: 1000
我需要怎么做呢? 谢谢!
原提问者GitHub用户elim051
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。