开发者社区> 问答> 正文

canal1.1.1 ClientAdapter 同步到hbase报错java.lang.NullP

`2018-10-31 10:26:48.345 ERROR 5095 --- [ main] c.a.o.c.a.l.loader.CanalAdapterService : ## something goes wrong when starting up the canal client adapters:

java.lang.NullPointerException: null at com.alibaba.otter.canal.adapter.launcher.loader.CanalAdapterLoader.init(CanalAdapterLoader.java:61) ~[classes!/:na] at com.alibaba.otter.canal.adapter.launcher.loader.CanalAdapterService.init(CanalAdapterService.java:48) ~[classes!/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_73] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_73] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_73] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_73] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365) [spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:308) [spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135) [spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422) [spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1694) [spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]`

修改了config/application.yml ,base/mytest_person2.yml ,启动了canal-deployer-1.1.1,deployer中的canal.serverMode=kafka,执行java -jar canal-adapter-launcher.jar报以上错误。

`[root@hadoop01 config]# cat application.yml server: port: 8081 logging: level: com.alibaba.otter.canal.client.adapter.hbase: DEBUG spring: jackson: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8 default-property-inclusion: non_null

hbasezookeeper.quorum: 127.0.0.1 hbase.zookeeper.property.clientPort: 2181 hbase.zookeeper.znode.parent: /hbase

canal.conf: canalServerHost: 127.0.0.1:11111

原提问者GitHub用户brightsong

展开
收起
Java工程师 2023-05-08 17:58:18 152 0
1 条回答
写回答
取消 提交回答
  • 你是用kafka模式, 不能用canalInstances模式接收数据, 把下面这段注释掉

    canalInstances: - instance: example groups: - outAdapters: - name: logger - name: hbase properties: hbase.zookeeper.quorum: ${hbase.zookeeper.quorum} hbase.zookeeper.property.clientPort: ${hbase.zookeeper.property.clientPort} zookeeper.znode.parent: ${hbase.zookeeper.znode.parent}

    从 mqTopics: 这里开始配置adapter

    原回答者GitHub用户rewerma

    2023-05-09 18:50:20
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Spring Cloud Alibaba - 重新定义 Java Cloud-Native 立即下载
The Reactive Cloud Native Arch 立即下载
JAVA开发手册1.5.0 立即下载