Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.6.0

Operating System version: windows10

Java version: 1.8

Step to reproduce this issue

new file src/main/resources/META-INF/dubbo/com.alibaba.dubbo.rpc.Filter ,file content is erpFilter=com.filter.ErpFilter

new ErpFilter Class in com.filter.ErpFilter ,ErpFilter is implements com.alibaba.dubbo.rpc.Filter interface

start project, run Main.main(args);

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

project is start

Actual Result

project is dubboShutdown

If there is an exception, please attach the exception trace:

[ERROR]15:21:15.835|main|||Caller+0	at com.alibaba.dubbo.container.Main.main(Main.java:91)

[DUBBO] Error creating bean with name 'com.erp.server.common.reg.service.IRegisterService': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.alibaba.dubbo.config.ProviderConfig': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'filter' threw exception; nested exception is java.lang.IllegalStateException: No such extension erpFilter for filter/com.alibaba.dubbo.rpc.Filter, dubbo version: 2.6.0, current host: 192.168.161.1

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.erp.server.common.reg.service.IRegisterService': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.alibaba.dubbo.config.ProviderConfig': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'filter' threw exception; nested exception is java.lang.IllegalStateException: No such extension erpFilter for filter/com.alibaba.dubbo.rpc.Filter

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)

at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)

at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93)

at com.alibaba.dubbo.container.spring.SpringContainer.start(SpringContainer.java:45)

at com.alibaba.dubbo.container.Main.main(Main.java:85)

at com.erp.server.common.reg.RegProvider.main(RegProvider.java:7)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.alibaba.dubbo.config.ProviderConfig': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'filter' threw exception; nested exception is java.lang.IllegalStateException: No such extension erpFilter for filter/com.alibaba.dubbo.rpc.Filter

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1568)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1276)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:519)

at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1194)

at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:310)

at com.alibaba.dubbo.config.spring.ServiceBean.afterPropertiesSet(ServiceBean.java:137)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)

... 14 common frames omitted

Caused by: org.springframework.beans.PropertyBatchUpdateException: Failed properties: Property 'filter' threw exception; nested exception is java.lang.IllegalStateException: No such extension erpFilter for filter/com.alibaba.dubbo.rpc.Filter

at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121)

at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1564)

... 27 common frames omitted

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.7

Operating System version: Windows 10 centos7.3

Java version: 1.8

Steps to reproduce this issue

继承dubboFilter，在invoke(Invoker<?> invoker, Invocation invocation)方法中使用RpcUtils.getInvokeMode(invoker.getUrl(), invocation)

对一个返回CompletableFuture的方法

在consumer中，getInvokeMode可以得到InvokeMode.FUTURE

在provider中，getInvokeMode可以得到InvokeMode.SYNC或InvokeMode.ASYNC（当配置async=true）时

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

provider中getInvokeMode应该也得到的是InvokeMode.FUTURE

Actual Result

同一个返回CompletableFuture的方法在consumer与provider两端解析得到的InvokeMode不一致

跟代码时发现，在provider端解析RpcInvocation时，没有将方法的returnType设置到RpcInvocation中，在RpcUtils中判断返回的class时就导致了错误

public static boolean isReturnTypeFuture(Invocation inv) {
Class<?> clazz;
if (inv instanceof RpcInvocation) {
clazz = ((RpcInvocation) inv).getReturnType();
} else {
clazz = getReturnType(inv);
}
return (clazz != null && CompletableFuture.class.isAssignableFrom(clazz)) || isGenericAsync(inv);
}

org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation#decode(org.apache.dubbo.remoting.Channel, java.io.InputStream)中
MethodDescriptor methodDescriptor = serviceDescriptor.getMethod(getMethodName(), desc);
if (methodDescriptor != null) {
pts = methodDescriptor.getParameterClasses();
this.setReturnTypes(methodDescriptor.getReturnTypes());
}

在provider端目前可以用org.apache.dubbo.rpc.support.RpcUtils#getReturnType解决这个问题，但是会影响性能