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

项目启动的时候注册dubbo 内部metadatainfo 序列化的时候报错 【数组越界】 #2429

Closed
Johnson-Jia opened this issue Apr 11, 2024 · 2 comments · Fixed by #2434
Labels
bug Something isn't working fixed
Milestone

Comments

@Johnson-Jia
Copy link

Johnson-Jia commented Apr 11, 2024

问题描述

项目启动的时候 dubbo 内部metadatainfo 序列化的时候报错 【数组越界】

环境信息

dubbo 3.2.x

  • OS信息: CentOS 7
  • JDK信息:8
  • 版本信息:2.0.48

 [DUBBO] Refresh instance and metadata error., dubbo version: 3.2.11, current host: 10.*.*.164, error code: 5-12. This may be caused by , go to https://dubbo.apache.org/faq/5/12 to find instructions.
java.lang.ArrayIndexOutOfBoundsException: 18432
	at com.alibaba.fastjson2.JSONWriterUTF16.writeName8Raw(JSONWriterUTF16.java:1718) ~[fastjson2-2.0.48.jar!/:na]
	at com.alibaba.fastjson2.writer.OWG_6_7_ServiceInfo.write(Unknown Source) ~[na:na]
	at com.alibaba.fastjson2.writer.ObjectWriterImplMap.write(ObjectWriterImplMap.java:565) ~[fastjson2-2.0.48.jar!/:na]
	at com.alibaba.fastjson2.writer.OWG_5_3_MetadataInfo.write(Unknown Source) ~[na:na]
	at com.alibaba.fastjson2.JSON.toJSONString(JSON.java:2976) ~[fastjson2-2.0.48.jar!/:na]
	at org.apache.dubbo.common.json.impl.FastJson2Impl.toJson(FastJson2Impl.java:37) ~[dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.common.utils.JsonUtils.toJson(JsonUtils.java:107) ~[dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.metadata.MetadataInfo.calAndGetRevision(MetadataInfo.java:208) ~[dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.registry.client.AbstractServiceDiscovery.calOrUpdateInstanceRevision(AbstractServiceDiscovery.java:369) ~[dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.registry.client.AbstractServiceDiscovery.register(AbstractServiceDiscovery.java:158) ~[dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.registry.client.AbstractServiceDiscovery.update(AbstractServiceDiscovery.java:177) ~[dubbo-3.2.11.jar!/:3.2.11]
	at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_202]
	at org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.refreshMetadataAndInstance(ServiceInstanceMetadataUtils.java:234) ~[dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.config.deploy.DefaultApplicationDeployer.refreshServiceInstance(DefaultApplicationDeployer.java:1018) ~[dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.registerServices(DefaultModuleDeployer.java:434) [dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.startSync(DefaultModuleDeployer.java:191) [dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.start(DefaultModuleDeployer.java:156) [dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onContextRefreshedEvent(DubboDeployApplicationListener.java:157) [dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:143) [dubbo-3.2.11.jar!/:3.2.11]
	at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:52) [dubbo-3.2.11.jar!/:3.2.11]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) [spring-context-5.3.27.jar!/:5.3.27]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) [spring-context-5.3.27.jar!/:5.3.27]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) [spring-context-5.3.27.jar!/:5.3.27]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421) [spring-context-5.3.27.jar!/:5.3.27]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378) [spring-context-5.3.27.jar!/:5.3.27]
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:940) [spring-context-5.3.27.jar!/:5.3.27]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) [spring-context-5.3.27.jar!/:5.3.27]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) [spring-boot-2.6.15.jar!/:2.6.15]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:745) [spring-boot-2.6.15.jar!/:2.6.15]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:423) [spring-boot-2.6.15.jar!/:2.6.15]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-2.6.15.jar!/:2.6.15]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1317) [spring-boot-2.6.15.jar!/:2.6.15]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) [spring-boot-2.6.15.jar!/:2.6.15]
@Johnson-Jia Johnson-Jia added the bug Something isn't working label Apr 11, 2024
@wenshao wenshao added this to the 2.0.49 milestone Apr 12, 2024
@wenshao wenshao reopened this Apr 12, 2024
@wenshao wenshao added the fixed label Apr 13, 2024
@wenshao
Copy link
Member

wenshao commented Apr 13, 2024

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.49-SNAPSHOT/
问题已经修复,请帮忙用2.0.49-SNAPSHOT版本验证,2.0.49版本预计在本周末(4月14日)前发布

@wenshao
Copy link
Member

wenshao commented Apr 14, 2024

@wenshao wenshao closed this as completed Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants