weibocom / motan

A cross-language remote procedure call(RPC) framework for rapid development of high performance distributed services.
Other
5.9k stars 1.78k forks source link

clent端是springboot的web项目,遇到is not visible from class loader错误怎么解决? #513

Open 89333367 opened 7 years ago

89333367 commented 7 years ago
Caused by: java.lang.IllegalArgumentException: interface com.springboot.motan.HelloService is not visible from class loader
    at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:581)
    at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557)
    at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
    at java.lang.reflect.WeakCache.get(WeakCache.java:127)
    at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419)
    at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719)
    at com.weibo.api.motan.proxy.spi.JdkProxyFactory.getProxy(JdkProxyFactory.java:36)
    at com.weibo.api.motan.config.handler.SimpleConfigHandler.refer(SimpleConfigHandler.java:63)
    at com.weibo.api.motan.config.RefererConfig.initRef(RefererConfig.java:137)
    at com.weibo.api.motan.config.RefererConfig.getRef(RefererConfig.java:85)
    at com.weibo.api.motan.config.springsupport.RefererConfigBean.getObject(RefererConfigBean.java:44)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
    ... 47 common frames omitted
rayzhang0603 commented 7 years ago

估计跟类加载方式或者jar包冲突之类的原因有关,你可以确认一下你声明的接口类是否是通过单独的classloader加载的