You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "GrayWind33 (GitHub)" <gi...@apache.org> on 2019/02/02 09:05:52 UTC

[GitHub] [incubator-dubbo] GrayWind33 opened issue #3426: dubbo 2.7.1-SNAPSHOT NoClassDefFoundError when use springboot

- [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: 2.7.1-SNAPSHOT
* Operating System version: MacOS
* Java version: 1.8

### Steps to reproduce this issue

1. add latest dubbo version and spring-boot-starter-dubbo
2. try to start springboot
3. java.lang.NoClassDefFoundError: org/apache/curator/retry/ExponentialBackoffRetry

### Actual Result

```
java.lang.NoClassDefFoundError: org/apache/curator/retry/ExponentialBackoffRetry
	at org.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfiguration.<init>(ZookeeperDynamicConfiguration.java:64) ~[dubbo-2.7.1-SNAPSHOT.jar:2.7.1-SNAPSHOT]
	at org.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfigurationFactory.createDynamicConfiguration(ZookeeperDynamicConfigurationFactory.java:29) ~[dubbo-2.7.1-SNAPSHOT.jar:2.7.1-SNAPSHOT]
	at org.apache.dubbo.configcenter.AbstractDynamicConfigurationFactory.getDynamicConfiguration(AbstractDynamicConfigurationFactory.java:33) ~[dubbo-2.7.1-SNAPSHOT.jar:2.7.1-SNAPSHOT]...
```
Have to manually add curator-framework and curator-recipes and then it starts successfully. But it seems not convenient. Any problem with the pom.xml setting?
必须手动增加curator-framework和curator-recipes两个依赖,否则无法通过springboot启动,请问下是配置有问题吗
The dependency:
```
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.dubbo</groupId>
      <artifactId>dubbo</artifactId>
      <version>2.7.1-SNAPSHOT</version>
    </dependency>

    <dependency>
      <groupId>io.dubbo.springboot</groupId>
      <artifactId>spring-boot-starter-dubbo</artifactId>
      <version>1.0.0</version>
      <exclusions>
        <exclusion>
          <groupId>com.alibaba</groupId>
          <artifactId>dubbo</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.apache.curator</groupId>
      <artifactId>curator-framework</artifactId>
      <version>4.0.1</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.zookeeper</groupId>
          <artifactId>zookeeper</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.curator</groupId>
      <artifactId>curator-recipes</artifactId>
      <version>4.0.1</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.zookeeper</groupId>
          <artifactId>zookeeper</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
```

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3426 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] mercyblitz closed issue #3426: dubbo 2.7.1-SNAPSHOT NoClassDefFoundError when use springboot

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
[ issue closed by mercyblitz ]

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3426 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] zhanglypl commented on issue #3426: dubbo 2.7.1-SNAPSHOT NoClassDefFoundError when use springboot

Posted by "zhanglypl (GitHub)" <gi...@apache.org>.
用curator-client 就可以解决

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3426 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] GrayWind33 commented on issue #3426: dubbo 2.7.1-SNAPSHOT NoClassDefFoundError when use springboot

Posted by "GrayWind33 (GitHub)" <gi...@apache.org>.
> I think it's a side effect of defaulting the Registry (only if it's zookeeper) as the Config Center.
> 
> I guess you are using `zookeeper` registry and `zkclient`, right?

yes, I use zk as my registry

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3426 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] chickenlj commented on issue #3426: dubbo 2.7.1-SNAPSHOT NoClassDefFoundError when use springboot

Posted by "chickenlj (GitHub)" <gi...@apache.org>.
I think it's a side effect of defaulting the Registry (only if it's zookeeper) as the Config Center.

I guess you are using `zookeeper` registry and `zkclient`, right?

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3426 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] beiwei30 commented on issue #3426: dubbo 2.7.1-SNAPSHOT NoClassDefFoundError when use springboot

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
we need to refresh README when we release 2.7.1

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3426 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] LiZhenNet commented on issue #3426: dubbo 2.7.1-SNAPSHOT NoClassDefFoundError when use springboot

Posted by "LiZhenNet (GitHub)" <gi...@apache.org>.
可以看一下示例:https://github.com/apache/incubator-dubbo-spring-boot-project/tree/master/dubbo-spring-boot-samples
应该仅仅添加:
>       <groupId>org.apache.curator</groupId>
>       <artifactId>curator-framework</artifactId>
就可以

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3426 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org