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

[Bug] version:3.2.14+ Builder org.apache.curator.framework.CuratorFrameworkFactory$Builder.ensembleTracker(boolean) #14559

Closed
3 of 4 tasks
ddwwbb opened this issue Aug 19, 2024 · 5 comments · Fixed by #14597
Closed
3 of 4 tasks
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage

Comments

@ddwwbb
Copy link

ddwwbb commented Aug 19, 2024

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

Dubbo java 3.2.14+ , jdk 17 ,zk 3.4.10

Steps to reproduce this issue

when use
pom.xml

org.apache.curator
curator-recipes
4.3.0


org.apache.zookeeper
zookeeper




org.apache.curator
curator-framework
4.3.0


org.apache.curator
curator-x-discovery-server
4.3.0


org.apache.zookeeper
zookeeper
3.4.10

error:
org.apache.curator.framework.CuratorFrameworkFactory$Builder org.apache.curator.framework.CuratorFrameworkFactory$Builder.ensembleTracker(boolean)

What you expected to happen

Caused by: java.lang.NoSuchMethodError: 'org.apache.curator.framework.CuratorFrameworkFactory$Builder org.apache.curator.framework.CuratorFrameworkFactory$Builder.ensembleTracker(boolean)'
at org.apache.dubbo.registry.zookeeper.util.CuratorFrameworkUtils.buildCuratorFramework(CuratorFrameworkUtils.java:76)
at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.(ZookeeperServiceDiscovery.java:83)
at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscoveryFactory.createDiscovery(ZookeeperServiceDiscoveryFactory.java:27)
at org.apache.dubbo.registry.client.AbstractServiceDiscoveryFactory.lambda$getServiceDiscovery$0(AbstractServiceDiscoveryFactory.java:54)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at org.apache.dubbo.common.utils.ConcurrentHashMapUtils.computeIfAbsent(ConcurrentHashMapUtils.java:56)
at org.apache.dubbo.registry.client.AbstractServiceDiscoveryFactory.getServiceDiscovery(AbstractServiceDiscoveryFactory.java:54)
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.getServiceDiscovery(ServiceDiscoveryRegistry.java:133)
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.createServiceDiscovery(ServiceDiscoveryRegistry.java:119)
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.(ServiceDiscoveryRegistry.java:94)
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryFactory.createRegistry(ServiceDiscoveryRegistryFactory.java:40)
at org.apache.dubbo.registry.support.AbstractRegistryFactory.getRegistry(AbstractRegistryFactory.java:95)
at org.apache.dubbo.registry.RegistryFactoryWrapper.getRegistry(RegistryFactoryWrapper.java:33)
at org.apache.dubbo.registry.RegistryFactory$Adaptive.getRegistry(RegistryFactory$Adaptive.java)
at org.apache.dubbo.registry.integration.RegistryProtocol.getRegistry(RegistryProtocol.java:459)
at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:266)
at org.apache.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:79)
at org.apache.dubbo.rpc.protocol.ProtocolSecurityWrapper.export(ProtocolSecurityWrapper.java:84)
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:66)
at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:58)
at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.export(ProtocolSerializationWrapper.java:50)
at org.apache.dubbo.rpc.protocol.InvokerCountWrapper.export(InvokerCountWrapper.java:42)
at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
at org.apache.dubbo.config.ServiceConfig.doExportUrl(ServiceConfig.java:947)
at org.apache.dubbo.config.ServiceConfig.exportRemote(ServiceConfig.java:917)
at org.apache.dubbo.config.ServiceConfig.exportUrl(ServiceConfig.java:857)
at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:602)
at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:583)
at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:540)
at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:340)
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.exportServiceInternal(DefaultModuleDeployer.java:477)
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.exportServices(DefaultModuleDeployer.java:424)
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.startSync(DefaultModuleDeployer.java:174)
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.start(DefaultModuleDeployer.java:156)
at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onContextRefreshedEvent(DubboDeployApplicationListener.java:157)
at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:143)
at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:52)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:451)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:384)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:984)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:335)

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

@ddwwbb ddwwbb added component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage labels Aug 19, 2024
@wcy666103
Copy link
Contributor

This feels like a dependency versioning problem, can you provide a way to reproduce the code in a public repository?

@ddwwbb
Copy link
Author

ddwwbb commented Aug 19, 2024

use

        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-spring-boot-starter</artifactId>
            <version>3.2.14</version>
        </dependency>

can Reappear error
,

        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo</artifactId>
            <version>3.2.14</version>
        </dependency>

no error

@funky-eyes
Copy link
Contributor

I think you should introduce 5.x curator dependencies

@ddwwbb
Copy link
Author

ddwwbb commented Aug 21, 2024

I think you should introduce 5.x curator dependencies

but use zookeeper 3.4.10,can't use 5.x curator

@aofall
Copy link
Contributor

aofall commented Aug 24, 2024

Looks like #14285 caused a breaking changes.

Although the dubbo-registry-zookeeper module introduces curator5 dependency default, but all the class and method are also exist in curator4 so it works fine before the #14285 pull request.

The new version of dubbo 3.3 only support curator5 and above, consider to upgrade the zookeeper to 3.5.x and above that prevent dependency and version problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants