Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.6hotfix版本的adapter运行异常:java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer #4358

Closed
microsofter opened this issue Aug 16, 2022 · 12 comments
Assignees
Labels
Milestone

Comments

@microsofter
Copy link

Question

canal版本1.1.6
下载了2022-08-11编译的hotfix包,运行后admin,deployer都正常,但adapter启动报错,信息如下:
2022-08-16 11:07:12.334 [main] INFO o.s.c.annotation.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@445b295b: startup date [Tue Aug 16 11:07:12 CST 2022]; root of context hierarchy
2022-08-16 11:07:12.834 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$a1606e1f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-08-16 11:07:13.834 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited
2022-08-16 11:07:14.037 [main] INFO c.a.otter.canal.adapter.launcher.CanalAdapterApplication - No active profile set, falling back to default profiles: default
2022-08-16 11:07:14.068 [main] INFO o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@553f1d75: startup date [Tue Aug 16 11:07:14 CST 2022]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@445b295b
2022-08-16 11:07:14.802 [main] INFO org.springframework.cloud.context.scope.GenericScope - BeanFactory id=d918d7e8-5091-3baa-be10-1466c8ff3b6d
2022-08-16 11:07:14.912 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$a1606e1f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-08-16 11:07:15.318 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8081 (http)
2022-08-16 11:07:15.334 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8081"]
2022-08-16 11:07:15.365 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat]
2022-08-16 11:07:15.365 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/8.5.29
2022-08-16 11:07:15.381 [localhost-startStop-1] INFO org.apache.catalina.core.AprLifecycleListener - The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_191\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Bingosoft\DeployAgent\tools;C:\Program Files\Bingosoft\DeployAgent\tools;C:\Program Files\Amazon\cfn-bootstrap;;C:\Program Files\Java\jdk1.8.0_191\bin;C:\Program Files\Java\jdk1.8.0_191\jre\bin;C:\Program Files (x86)\VRV\CEMS;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;;.]
2022-08-16 11:07:15.599 [localhost-startStop-1] INFO o.a.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2022-08-16 11:07:15.599 [localhost-startStop-1] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1531 ms
2022-08-16 11:07:15.787 [localhost-startStop-1] INFO o.s.boot.web.servlet.ServletRegistrationBean - Servlet statViewServlet mapped to [/druid/]
2022-08-16 11:07:15.787 [localhost-startStop-1] INFO o.s.boot.web.servlet.ServletRegistrationBean - Servlet dispatcherServlet mapped to [/]
2022-08-16 11:07:15.787 [localhost-startStop-1] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'characterEncodingFilter' to: [/
]
2022-08-16 11:07:15.802 [localhost-startStop-1] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'hiddenHttpMethodFilter' to: [/]
2022-08-16 11:07:15.802 [localhost-startStop-1] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'httpPutFormContentFilter' to: [/
]
2022-08-16 11:07:15.802 [localhost-startStop-1] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'requestContextFilter' to: [/*]
2022-08-16 11:07:16.224 [main] INFO o.s.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [//favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2022-08-16 11:07:16.490 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@553f1d75: startup date [Tue Aug 16 11:07:14 GMT+08:00 2022]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@445b295b
2022-08-16 11:07:16.615 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/count/{type}/{key}/{task}],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.count(java.lang.String,java.lang.String,java.lang.String)
2022-08-16 11:07:16.615 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/count/{type}/{task}],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.count(java.lang.String,java.lang.String)
2022-08-16 11:07:16.615 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/destinations],methods=[GET]}" onto public java.util.List<java.util.Map<java.lang.String, java.lang.String>> com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.destinations()
2022-08-16 11:07:16.615 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/etl/{type}/{key}/{task}],methods=[POST]}" onto public com.alibaba.otter.canal.client.adapter.support.EtlResult com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.etl(java.lang.String,java.lang.String,java.lang.String,java.lang.String)
2022-08-16 11:07:16.615 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/syncSwitch/{destination}],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.String> com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.etl(java.lang.String)
2022-08-16 11:07:16.615 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/syncSwitch/{destination}/{status}],methods=[PUT]}" onto public com.alibaba.otter.canal.client.adapter.support.Result com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.etl(java.lang.String,java.lang.String)
2022-08-16 11:07:16.615 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/etl/{type}/{task}],methods=[POST]}" onto public com.alibaba.otter.canal.client.adapter.support.EtlResult com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.etl(java.lang.String,java.lang.String,java.lang.String)
2022-08-16 11:07:16.631 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2022-08-16 11:07:16.631 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2022-08-16 11:07:16.662 [main] INFO o.s.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/webjars/
] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2022-08-16 11:07:16.662 [main] INFO o.s.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2022-08-16 11:07:17.006 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Registering beans for JMX exposure on startup
2022-08-16 11:07:17.021 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Bean with name 'refreshScope' has been autodetected for JMX exposure
2022-08-16 11:07:17.021 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2022-08-16 11:07:17.021 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Bean with name 'environmentManager' has been autodetected for JMX exposure
2022-08-16 11:07:17.021 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2022-08-16 11:07:17.037 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2022-08-16 11:07:17.052 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=553f1d75,type=ConfigurationPropertiesRebinder]
2022-08-16 11:07:17.068 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterService - ## syncSwitch refreshed.
2022-08-16 11:07:17.068 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterService - ## start the canal client adapters.
2022-08-16 11:07:17.084 [main] INFO c.a.otter.canal.client.adapter.support.ExtensionLoader - extension classpath dir: D:\canal-v1.1.6\adapter_hotfix\plugin
2022-08-16 11:07:17.131 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterLoader - Load canal adapter: logger succeed
2022-08-16 11:07:17.146 [main] INFO c.a.otter.canal.client.adapter.rdb.config.ConfigLoader - ## Start loading rdb mapping config ...
2022-08-16 11:07:17.209 [main] INFO c.a.otter.canal.client.adapter.rdb.config.ConfigLoader - ## Rdb mapping config loaded
2022-08-16 11:07:17.537 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-2} inited
2022-08-16 11:07:17.552 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterLoader - Load canal adapter: rdb succeed
2022-08-16 11:07:17.568 [main] INFO c.alibaba.otter.canal.connector.core.spi.ExtensionLoader - extension classpath dir: D:\canal-v1.1.6\adapter_hotfix\plugin
2022-08-16 11:07:17.599 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterLoader - Start adapter for canal-client mq topic: Canal_31TO83-gPBM succeed
2022-08-16 11:07:17.599 [Thread-4] INFO c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - =============> Start to connect destination: Canal_31TO83 <=============
2022-08-16 11:07:17.599 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterService - ## the canal client adapters are running now ......
2022-08-16 11:07:17.615 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8081"]
2022-08-16 11:07:17.615 [Thread-4] ERROR c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - process error!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.readNextPacket(SimpleCanalConnector.java:412) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.readNextPacket(SimpleCanalConnector.java:397) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.doConnect(SimpleCanalConnector.java:155) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.connect(SimpleCanalConnector.java:116) ~[na:na]
at com.alibaba.otter.canal.connector.tcp.consumer.CanalTCPConsumer.connect(CanalTCPConsumer.java:63) ~[na:na]
at com.alibaba.otter.canal.adapter.launcher.loader.AdapterProcessor.process(AdapterProcessor.java:185) ~[client-adapter.launcher-1.1.6.jar:na]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_191]
2022-08-16 11:07:17.631 [main] INFO org.apache.tomcat.util.net.NioSelectorPool - Using a shared selector for servlet write/read
2022-08-16 11:07:17.646 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8081 (http) with context path ''
2022-08-16 11:07:17.646 [main] INFO c.a.otter.canal.adapter.launcher.CanalAdapterApplication - Started CanalAdapterApplication in 6.047 seconds (JVM running for 7.13)

然后还是用1.1.6hotfix版的admin和deployer,adapter换成2022-05-24发布的包,运行正常,可以同步数据。

@yqzdy1207
Copy link

me too
canal-admin
Caused by: java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;

@MiLeskylimit
Copy link

一样的情况
java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer
我看2022-05-24发布的包现在也是和1.1.6hotfix的一样

@zeyuGitHup
Copy link

已解决
跟了下源码
com.alibaba.otter.canal.client.impl.SimpleCanalConnector 42行,方法readHeader.clear();
进行方法,调的是jdk的下rt.jar里面的方法。异常信息是java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer,但是明明jdk是有这个方法的。
image
一般这种情况是jdk版本不一致导致的。可能作者用是jdk 9,10,11或者更高版本开发的,而环境变量低于代码编译版本。
所以用高版本运行就可以了。
我直接用了jdk12运行,就没有报这个错了。我用的是mysql同步es,数据同步正常。我直接用jdk12测试的,可能 9,10,11也可以,你们自己去测试。这个问题网上找了半天也没有找到答案,我看也有好多同学在问。版本发布声音说的是jdk1.6.x以上就可以运行,太坑了。
image

@fuxingyun
Copy link

已解决 跟了下源码 com.alibaba.otter.canal.client.impl.SimpleCanalConnector 42行,方法readHeader.clear(); 进行方法,调的是jdk的下rt.jar里面的方法。异常信息是java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer,但是明明jdk是有这个方法的。 image 一般这种情况是jdk版本不一致导致的。可能作者用是jdk 9,10,11或者更高版本开发的,而环境变量低于代码编译版本。 所以用高版本运行就可以了。 我直接用了jdk12运行,就没有报这个错了。我用的是mysql同步es,数据同步正常。我直接用jdk12测试的,可能 9,10,11也可以,你们自己去测试。这个问题网上找了半天也没有找到答案,我看也有好多同学在问。版本发布声音说的是jdk1.6.x以上就可以运行,太坑了。 image

试了jdk11 也可以解决这个问题

@agapple
Copy link
Member

agapple commented Sep 13, 2022

最新的1.1.7-alpha已经兼容了jdk>=1.8的运行

@agapple agapple added this to the v1.1.7 milestone Sep 13, 2022
@agapple agapple added the bug label Sep 13, 2022
@agapple agapple self-assigned this Sep 13, 2022
@agapple agapple closed this as completed Sep 13, 2022
@iJonSo
Copy link

iJonSo commented Sep 21, 2022

一样的报错:
环境:JDK1.8,CentOS7.9
版本:adapter 1.1.6hotfix

2022-09-21 13:12:33.079 [main] INFO o.s.c.annotation.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2beee7ff: startup date [Wed Sep 21 13:12:33 CST 2022]; root of context hierarchy
2022-09-21 13:12:33.540 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$963e1c4e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-09-21 13:12:34.055 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited
2022-09-21 13:12:34.213 [main] INFO c.a.otter.canal.adapter.launcher.CanalAdapterApplication - No active profile set, falling back to default profiles: default
2022-09-21 13:12:34.256 [main] INFO o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1991f767: startup date [Wed Sep 21 13:12:34 CST 2022]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@2beee7ff
2022-09-21 13:12:34.830 [main] INFO org.springframework.cloud.context.scope.GenericScope - BeanFactory id=d918d7e8-5091-3baa-be10-1466c8ff3b6d
2022-09-21 13:12:34.901 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$963e1c4e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-09-21 13:12:35.135 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8081 (http)
2022-09-21 13:12:35.154 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8081"]
2022-09-21 13:12:35.164 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat]
2022-09-21 13:12:35.165 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/8.5.29
2022-09-21 13:12:35.176 [localhost-startStop-1] INFO org.apache.catalina.core.AprLifecycleListener - The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2022-09-21 13:12:35.261 [localhost-startStop-1] INFO o.a.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2022-09-21 13:12:35.261 [localhost-startStop-1] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1005 ms
2022-09-21 13:12:35.365 [localhost-startStop-1] INFO o.s.boot.web.servlet.ServletRegistrationBean - Servlet statViewServlet mapped to [/druid/]
2022-09-21 13:12:35.368 [localhost-startStop-1] INFO o.s.boot.web.servlet.ServletRegistrationBean - Servlet dispatcherServlet mapped to [/]
2022-09-21 13:12:35.371 [localhost-startStop-1] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'characterEncodingFilter' to: [/
]
2022-09-21 13:12:35.371 [localhost-startStop-1] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'hiddenHttpMethodFilter' to: [/]
2022-09-21 13:12:35.371 [localhost-startStop-1] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'httpPutFormContentFilter' to: [/
]
2022-09-21 13:12:35.371 [localhost-startStop-1] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'requestContextFilter' to: [/*]
2022-09-21 13:12:35.544 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-2} inited
2022-09-21 13:12:35.660 [main] INFO o.s.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [//favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2022-09-21 13:12:35.863 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1991f767: startup date [Wed Sep 21 13:12:34 GMT+08:00 2022]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@2beee7ff
2022-09-21 13:12:35.964 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/syncSwitch/{destination}/{status}],methods=[PUT]}" onto public com.alibaba.otter.canal.client.adapter.support.Result com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.etl(java.lang.String,java.lang.String)
2022-09-21 13:12:35.965 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/etl/{type}/{key}/{task}],methods=[POST]}" onto public com.alibaba.otter.canal.client.adapter.support.EtlResult com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.etl(java.lang.String,java.lang.String,java.lang.String,java.lang.String)
2022-09-21 13:12:35.966 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/syncSwitch/{destination}],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.String> com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.etl(java.lang.String)
2022-09-21 13:12:35.966 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/etl/{type}/{task}],methods=[POST]}" onto public com.alibaba.otter.canal.client.adapter.support.EtlResult com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.etl(java.lang.String,java.lang.String,java.lang.String)
2022-09-21 13:12:35.967 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/destinations],methods=[GET]}" onto public java.util.List<java.util.Map<java.lang.String, java.lang.String>> com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.destinations()
2022-09-21 13:12:35.967 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/count/{type}/{task}],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.count(java.lang.String,java.lang.String)
2022-09-21 13:12:35.967 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/count/{type}/{key}/{task}],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.alibaba.otter.canal.adapter.launcher.rest.CommonRest.count(java.lang.String,java.lang.String,java.lang.String)
2022-09-21 13:12:35.971 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2022-09-21 13:12:35.972 [main] INFO o.s.w.s.m.method.annotation.RequestMappingHandlerMapping - Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2022-09-21 13:12:36.006 [main] INFO o.s.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/webjars/
] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2022-09-21 13:12:36.006 [main] INFO o.s.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2022-09-21 13:12:36.233 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Registering beans for JMX exposure on startup
2022-09-21 13:12:36.245 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Bean with name 'refreshScope' has been autodetected for JMX exposure
2022-09-21 13:12:36.246 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2022-09-21 13:12:36.247 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Bean with name 'environmentManager' has been autodetected for JMX exposure
2022-09-21 13:12:36.251 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2022-09-21 13:12:36.266 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2022-09-21 13:12:36.275 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=1991f767,type=ConfigurationPropertiesRebinder]
2022-09-21 13:12:36.291 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterService - ## syncSwitch refreshed.
2022-09-21 13:12:36.291 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterService - ## start the canal client adapters.
2022-09-21 13:12:36.295 [main] INFO c.a.otter.canal.client.adapter.support.ExtensionLoader - extension classpath dir: /opt/jdk/adapter1.1.6/plugin
2022-09-21 13:12:36.349 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterLoader - Load canal adapter: logger succeed
2022-09-21 13:12:36.738 [main] INFO c.a.o.c.client.adapter.es.core.config.ESSyncConfigLoader - ## Start loading es mapping config ...
2022-09-21 13:12:36.820 [main] INFO c.a.o.c.client.adapter.es.core.config.ESSyncConfigLoader - ## ES mapping config loaded
2022-09-21 13:12:37.190 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterLoader - Load canal adapter: es7 succeed
2022-09-21 13:12:37.197 [main] INFO c.alibaba.otter.canal.connector.core.spi.ExtensionLoader - extension classpath dir: /opt/jdk/adapter1.1.6/plugin
2022-09-21 13:12:37.222 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterLoader - Start adapter for canal-client mq topic: example-g1 succeed
2022-09-21 13:12:37.222 [Thread-4] INFO c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - =============> Start to connect destination: example <=============
2022-09-21 13:12:37.224 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterService - ## the canal client adapters are running now ......
2022-09-21 13:12:37.230 [Thread-4] ERROR c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - process error!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.readNextPacket(SimpleCanalConnector.java:412) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.readNextPacket(SimpleCanalConnector.java:397) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.doConnect(SimpleCanalConnector.java:155) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.connect(SimpleCanalConnector.java:116) ~[na:na]
at com.alibaba.otter.canal.connector.tcp.consumer.CanalTCPConsumer.connect(CanalTCPConsumer.java:63) ~[na:na]
at com.alibaba.otter.canal.adapter.launcher.loader.AdapterProcessor.process(AdapterProcessor.java:185) ~[client-adapter.launcher-1.1.6.jar:na]
at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_341]
2022-09-21 13:12:37.230 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8081"]
2022-09-21 13:12:37.232 [main] INFO org.apache.tomcat.util.net.NioSelectorPool - Using a shared selector for servlet write/read
2022-09-21 13:12:37.286 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8081 (http) with context path ''
2022-09-21 13:12:37.288 [main] INFO c.a.otter.canal.adapter.launcher.CanalAdapterApplication - Started CanalAdapterApplication in 4.691 seconds (JVM running for 5.284)
2022-09-21 13:12:38.231 [Thread-4] INFO c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - =============> Start to connect destination: example <=============
2022-09-21 13:12:38.233 [Thread-4] ERROR c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - process error!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.readNextPacket(SimpleCanalConnector.java:412) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.readNextPacket(SimpleCanalConnector.java:397) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.doConnect(SimpleCanalConnector.java:155) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.connect(SimpleCanalConnector.java:116) ~[na:na]
at com.alibaba.otter.canal.connector.tcp.consumer.CanalTCPConsumer.connect(CanalTCPConsumer.java:63) ~[na:na]
at com.alibaba.otter.canal.adapter.launcher.loader.AdapterProcessor.process(AdapterProcessor.java:185) ~[client-adapter.launcher-1.1.6.jar:na]
at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_341]
2022-09-21 13:12:39.234 [Thread-4] INFO c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - =============> Start to connect destination: example <=============
2022-09-21 13:12:39.235 [Thread-4] ERROR c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - process error!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.readNextPacket(SimpleCanalConnector.java:412) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.readNextPacket(SimpleCanalConnector.java:397) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.doConnect(SimpleCanalConnector.java:155) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.connect(SimpleCanalConnector.java:116) ~[na:na]
at com.alibaba.otter.canal.connector.tcp.consumer.CanalTCPConsumer.connect(CanalTCPConsumer.java:63) ~[na:na]
at com.alibaba.otter.canal.adapter.launcher.loader.AdapterProcessor.process(AdapterProcessor.java:185) ~[client-adapter.launcher-1.1.6.jar:na]
at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_341]

@12345ZMTHL
Copy link

最新的1.1.7-alpha已经兼容了jdk>=1.8的运行

我现在就是用最新得1.1.7-alpha-1,jdk还是1.8,问题还是出现了

@MiLeskylimit
Copy link

MiLeskylimit commented Oct 6, 2022 via email

@das3641
Copy link

das3641 commented Apr 23, 2023

阿里的开源就是搞笑,没有任何规范,想怎么改就怎么改,反正是刷kpi

@cccdl
Copy link

cccdl commented May 12, 2023

升级jdk11解决

@mba1398
Copy link

mba1398 commented Aug 23, 2023

存在这种bug,建议废弃这个版本或者修改 wiki,研究了好几天了。。。太坑了

@e345
Copy link
Contributor

e345 commented Nov 11, 2023

阿里的开源就是搞笑,没有任何规范,想怎么改就怎么改,反正是刷kpi

哈哈,不要这么说,咱们不能吃别人的饭,还要砸别人的锅。
这不是有源代码吗,一切可以搞定

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests