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.7.7

Operating System version: xxx

Java version: 1.8

Steps to reproduce this issue

@DubboReference(check = false, protocol = "hessian")

private HkService hkService;

EchoService echoService = (EchoService) hkService;
Object oj = echoService.$echo("成立");

Expected Result

ok

Actual Result

org.apache.dubbo.common.bytecode.NoSuchMethodException: Not found method "$echo" in class com.example.service.HkService.

at org.apache.dubbo.common.bytecode.Wrapper2.invokeMethod(Wrapper2.java)

at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47)

at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:84)

at org.apache.dubbo.rpc.protocol.AbstractProxyProtocol$2.doInvoke(AbstractProxyProtocol.java:113)

at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:163)

at org.apache.dubbo.rpc.protocol.AsyncToSyncInvoker.invoke(AsyncToSyncInvoker.java:52)

at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:78)

at com.alibaba.dubbo.rpc.Invoker$CompatibleInvoker.invoke(Invoker.java:55)

at io.seata.integration.dubbo.alibaba.AlibabaDubboTransactionPropagationFilter.invoke(AlibabaDubboTransactionPropagationFilter.java:43)

at com.alibaba.dubbo.rpc.Filter.invoke(Filter.java:29)

at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:81)

at io.seata.integration.dubbo.ApacheDubboTransactionPropagationFilter.invoke(ApacheDubboTransactionPropagationFilter.java:65)

at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:81)

at co.faao.plugin.filter.ConsumerExceptionFilter.invoke(ConsumerExceptionFilter.java:28)

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.

https://github.com/apache/dubbo/issues/5479

Environment

Dubbo version: 2.7.7

Operating System version: CentOS Linux release 7.6.1810 (Core)

Java version: 1.8

Steps to reproduce this issue

org.apache.dubbo.rpc.proxy.AbstractProxyFactory

if (generic) {
if (!GenericService.class.isAssignableFrom(invoker.getInterface())) {
interfaces.add(com.alibaba.dubbo.rpc.service.GenericService.class);
}

try {
// find the real interface from url
String realInterface = invoker.getUrl().getParameter(Constants.INTERFACE);
interfaces.add(ReflectUtils.forName(realInterface));
} catch (Throwable e) {
// ignore
}
}

当设置泛化调用时，在客户端创建代理AbstractProxyFactory这一步添加realInterface之后，如果在realInterface这个接口类里有包含当前创建代理类的系统没有依赖的包时(堆栈里的common.result.PagingQueryResult未被consumer依赖)，会在接下来创建代理的是时候报错NoClassDefFoundError

//create consumer
ReferenceConfig<GenericService> reference = new ReferenceConfig<>();
reference.setInterface(ifaceName);
reference.setConsumer(consumerConfig);
reference.setGeneric("true");
reference.setAsync(true);
reference.setCheck(false);
ReferenceConfigCache cache = ReferenceConfigCache.getCache();
GenericService genericService = cache.get(reference);

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

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

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

java.lang.ClassNotFoundException: common.result.PagingQueryResult
0 = {StackTraceElement@13179} "java.lang.Class.getDeclaredMethods0(Native Method)"
1 = {StackTraceElement@13180} "java.lang.Class.privateGetDeclaredMethods(Class.java:2701)"
2 = {StackTraceElement@13181} "java.lang.Class.privateGetPublicMethods(Class.java:2902)"
3 = {StackTraceElement@13182} "java.lang.Class.getMethods(Class.java:1615)"
4 = {StackTraceElement@13183} "org.apache.dubbo.common.bytecode.Proxy.getProxy(Proxy.java:156)"
5 = {StackTraceElement@13184} "org.apache.dubbo.common.bytecode.Proxy.getProxy(Proxy.java:66)"
6 = {StackTraceElement@13185} "org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory.getProxy(JavassistProxyFactory.java:35)"
7 = {StackTraceElement@13186} "org.apache.dubbo.rpc.proxy.AbstractProxyFactory.getProxy(AbstractProxyFactory.java:79)"
8 = {StackTraceElement@13187} "org.apache.dubbo.rpc.proxy.wrapper.StubProxyFactoryWrapper.getProxy(StubProxyFactoryWrapper.java:66)"
9 = {StackTraceElement@13188} "org.apache.dubbo.rpc.ProxyFactory$Adaptive.getProxy(ProxyFactory$Adaptive.java)"
10 = {StackTraceElement@13189} "org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:366)"
11 = {StackTraceElement@13190} "org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:258)"
12 = {StackTraceElement@13191} "org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:158)"
13 = {StackTraceElement@13192} "org.apache.dubbo.config.utils.ReferenceConfigCache.lambda$get$3(ReferenceConfigCache.java:114)"
14 = {StackTraceElement@13193} "java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)"
15 = {StackTraceElement@13194} "org.apache.dubbo.config.utils.ReferenceConfigCache.get(ReferenceConfigCache.java:113)"