You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "jxs-nv (via GitHub)" <gi...@apache.org> on 2023/04/28 00:31:34 UTC

[GitHub] [dubbo] jxs-nv opened a new issue, #12208: alibaba dubbo切换为apache dubbo,ReferenceConfig对象setApplication方法及setRegistry方法异常

jxs-nv opened a new issue, #12208:
URL: https://github.com/apache/dubbo/issues/12208

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.1.x ; 3.2.x
   * Operating System version: ubuntu 22.04
   * Java version: 1.8;17
   
   ### Steps to reproduce this issue
   
   1. 使用alibaba dubbo时的代码
      com.alibaba.dubbo.config.ReferenceConfig<ISksService> referenceConfig = new com.alibaba.dubbo.config.ReferenceConfig<>();
           String appName = "sks-client";
           referenceConfig.setApplication(new com.alibaba.dubbo.config.ApplicationConfig(appName));
           referenceConfig.setInterface(ISksService.class);
           String registryConfigList = "nacos://nacos.dev.com:8848";
           com.alibaba.dubbo.config.RegistryConfig dubboRegistry = new com.alibaba.dubbo.config.RegistryConfig();
           dubboRegistry.setAddress(registryConfigList);
           referenceConfig.setRegistry(dubboRegistry);
           ISksService service = referenceConfig.get();
           Result<String> encoder = service.encode("test");
           System.out.println(encoder.getValue());
   2. 切换为apache dubbo 依赖后 在referenceConfig.setApplication(new com.alibaba.dubbo.config.ApplicationConfig(appName)); 和 referenceConfig.setRegistry(dubboRegistry); 两处存在异常 java.lang.NoSuchMethodError: com.alibaba.dubbo.config.ReferenceConfig.setApplication(Lcom/alibaba/dubbo/config/ApplicationConfig;)V 及 java.lang.NoSuchMethodError: com.alibaba.dubbo.config.ReferenceConfig.setRegistry(Lcom/alibaba/dubbo/config/RegistryConfig;)V
   3.
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   ### Expected Behavior
   
   <!-- What do you expect from the above steps?-->
   
   ### Actual Behavior
   
   <!-- What actually happens? -->
   
   If there is an exception, please attach the exception trace:
   
   ```
   java.lang.NoSuchMethodError: com.alibaba.dubbo.config.ReferenceConfig.setApplication(Lcom/alibaba/dubbo/config/ApplicationConfig;)V
    java.lang.NoSuchMethodError: com.alibaba.dubbo.config.ReferenceConfig.setRegistry(Lcom/alibaba/dubbo/config/RegistryConfig;)V
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #12208: alibaba dubbo切换为apache dubbo,ReferenceConfig对象setApplication方法及setRegistry方法异常

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #12208:
URL: https://github.com/apache/dubbo/issues/12208#issuecomment-1532394039

   Integration test cases: https://github.com/apache/dubbo-samples/pull/834


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #12208: alibaba dubbo切换为apache dubbo,ReferenceConfig对象setApplication方法及setRegistry方法异常

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #12208:
URL: https://github.com/apache/dubbo/issues/12208#issuecomment-1526868122

   应该是目前 ReferenceConfig 没有提供 alibaba 包的重载实现,导致如果 jar 包不重新编译会找不到老签名的方法


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ closed issue #12208: alibaba dubbo切换为apache dubbo,ReferenceConfig对象setApplication方法及setRegistry方法异常

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #12208: alibaba dubbo切换为apache dubbo,ReferenceConfig对象setApplication方法及setRegistry方法异常
URL: https://github.com/apache/dubbo/issues/12208


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] jxs-nv commented on issue #12208: alibaba dubbo切换为apache dubbo,ReferenceConfig对象setApplication方法及setRegistry方法异常

Posted by "jxs-nv (via GitHub)" <gi...@apache.org>.
jxs-nv commented on issue #12208:
URL: https://github.com/apache/dubbo/issues/12208#issuecomment-1529154400

   > 应该是目前 ReferenceConfig 没有提供 alibaba 包的重载实现,导致如果 jar 包不重新编译会找不到老签名的方法
   嗯,是的,通过fork,修改了源码重写了两个方法, 打包制品的确解决了此问题,但为以后的项目升级带来了不便. 虽然我们的社区在考虑了由alibaba dubbo 用户切换apache dubbo 中提供了一些支持,但也局限于使用了注解式的方式,有一些场景需要动态的编程式生成代理类, 就会出现此问题. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] November22 commented on issue #12208: alibaba dubbo切换为apache dubbo,ReferenceConfig对象setApplication方法及setRegistry方法异常

Posted by "November22 (via GitHub)" <gi...@apache.org>.
November22 commented on issue #12208:
URL: https://github.com/apache/dubbo/issues/12208#issuecomment-1526853980

   可以看下是不是包冲突,同时存在alibaba dubbo和apache dubbo包


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #12208: alibaba dubbo切换为apache dubbo,ReferenceConfig对象setApplication方法及setRegistry方法异常

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #12208:
URL: https://github.com/apache/dubbo/issues/12208#issuecomment-1531468836

   > > > 应该是目前 ReferenceConfig 没有提供 alibaba 包的重载实现,导致如果 jar 包不重新编译会找不到老签名的方法
   > > > 嗯,是的,通过fork,修改了源码重载了两个方法, 打包制品的确解决了此问题,但为以后的项目升级带来了不便. 虽然我们的社区在考虑了由alibaba dubbo 用户切换apache dubbo 中提供了一些支持,但也局限于使用了注解式的方式,有一些场景需要动态的编程式生成代理类, 就会出现此问题.
   > 
   > 这个需要修复下的,我来改下
   
   https://github.com/apache/dubbo/pull/12220 已经提交,3.2.1 版本会修复


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #12208: alibaba dubbo切换为apache dubbo,ReferenceConfig对象setApplication方法及setRegistry方法异常

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #12208:
URL: https://github.com/apache/dubbo/issues/12208#issuecomment-1531179365

   > > 应该是目前 ReferenceConfig 没有提供 alibaba 包的重载实现,导致如果 jar 包不重新编译会找不到老签名的方法
   > > 嗯,是的,通过fork,修改了源码重载了两个方法, 打包制品的确解决了此问题,但为以后的项目升级带来了不便. 虽然我们的社区在考虑了由alibaba dubbo 用户切换apache dubbo 中提供了一些支持,但也局限于使用了注解式的方式,有一些场景需要动态的编程式生成代理类, 就会出现此问题.
   
   这个需要修复下的,我来改下


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org