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

java.lang.NoClassDefFoundError #1364

Closed
kathetina opened this issue Jun 13, 2019 · 3 comments
Closed

java.lang.NoClassDefFoundError #1364

kathetina opened this issue Jun 13, 2019 · 3 comments
Labels
area/Dubbo Related to dubbo kind/bug Category issues or prs related to bug.

Comments

@kathetina
Copy link

  1. dubbo-2.7.2 + dubbo-registry-nacos-2.7.2+nacos-1.0.1

  2. error message
    Exception in thread "main" java.lang.NoClassDefFoundError: com/alibaba/nacos/client/naming/utils/StringUtils
    at org.apache.dubbo.registry.nacos.NacosRegistryFactory.putPropertyIfAbsent(NacosRegistryFactory.java:104)
    at org.apache.dubbo.registry.nacos.NacosRegistryFactory.setProperties(NacosRegistryFactory.java:94)
    at org.apache.dubbo.registry.nacos.NacosRegistryFactory.buildNacosProperties(NacosRegistryFactory.java:73)
    at org.apache.dubbo.registry.nacos.NacosRegistryFactory.buildNamingService(NacosRegistryFactory.java:57)
    at org.apache.dubbo.registry.nacos.NacosRegistryFactory.createRegistry(NacosRegistryFactory.java:53)
    at org.apache.dubbo.registry.support.AbstractRegistryFactory.getRegistry(AbstractRegistryFactory.java:103)
    at org.apache.dubbo.registry.RegistryFactory$Adaptive.getRegistry(RegistryFactory$Adaptive.java)
    at org.apache.dubbo.registry.integration.RegistryProtocol.getRegistry(RegistryProtocol.java:298)
    at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:212)
    at org.apache.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:61)
    at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:120)
    at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:59)
    at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
    at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:607)
    at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:457)
    at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:415)
    at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:378)
    at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:336)
    at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:114)
    at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:60)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
    at org.apache.dubbo.container.spring.SpringContainer.start(SpringContainer.java:50)
    at org.apache.dubbo.container.Main.main(Main.java:90)
    Caused by: java.lang.ClassNotFoundException: com.alibaba.nacos.client.naming.utils.StringUtils
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    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)

there is no StringUtils:
image

there is StringUtils:
image

@nacos-bot nacos-bot added the kind/bug Category issues or prs related to bug. label Jun 13, 2019
@nkorange
Copy link
Collaborator

The cause of this error is that com.alibaba.nacos.client.naming.utils.StringUtils is moved to com.alibaba.nacos.client.utils.StringUtils. Currently you have to fall back to Nacos 1.0.0. Report this bug to Dubbo please, they should change their invocation of StringUtils.

@nkorange nkorange added the area/Dubbo Related to dubbo label Jun 13, 2019
@nkorange
Copy link
Collaborator

This problem will be fixed in the next version of Dubbo.

@moayi
Copy link

moayi commented Nov 6, 2019

你好,我在整合spingmvc和nacos,能提供
com.alibaba
dubbo-registry-nacos
0.0.2



com.alibaba
dubbo
2.6.5



com.alibaba.spring
spring-context-support
1.0.2


io.netty
netty-all
4.1.22.Final


com.alibaba
fastjson
${fastjson.version}



com.alibaba.nacos
nacos-spring-context
0.3.3



com.alibaba.nacos
nacos-client
1.1.4

的版本对吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/Dubbo Related to dubbo kind/bug Category issues or prs related to bug.
Projects
None yet
Development

No branches or pull requests

4 participants