dubbo-client.xml 配置如下
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<dubbo:application id="linshen-dubbo-consumer-id1" name="linshen-dubbo-consumer-name1" />
<dubbo:registry id="lin-registry-1" protocol="zookeeper" address="192.168.223.132:2181,192.168.223.133:2181,192.168.223.134:2181" />
<dubbo:reference id="helloService" interface="com.linshen.dubbo.baseinterface.service.HelloService" />
</beans>
异常日志如下
org.nutz.ioc.IocException: IocBean[userStageDataService] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44) [nutz-1.r.66.jar:1.r.66]
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67) [nutz-1.r.66.jar:1.r.66]
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31) [nutz-1.r.66.jar:1.r.66]
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202) [nutz-1.r.66.jar:1.r.66]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.10]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.10]
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) [shiro-all-1.4.1.jar:?]
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-all-1.4.1.jar:?]
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-all-1.4.1.jar:?]
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-all-1.4.1.jar:?]
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) [shiro-all-1.4.1.jar:?]
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [shiro-all-1.4.1.jar:?]
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [shiro-all-1.4.1.jar:?]
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-all-1.4.1.jar:?]
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-all-1.4.1.jar:?]
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387) [shiro-all-1.4.1.jar:?]
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-all-1.4.1.jar:?]
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-all-1.4.1.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.10]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.10]
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123) [druid-1.1.9.jar:1.1.9]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.10]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.10]
at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) [log4j-web-2.6.jar:2.6]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.10]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.10]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [catalina.jar:9.0.10]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:9.0.10]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) [catalina.jar:9.0.10]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [catalina.jar:9.0.10]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.10]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) [catalina.jar:9.0.10]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:9.0.10]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.10]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-coyote.jar:9.0.10]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:9.0.10]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) [tomcat-coyote.jar:9.0.10]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) [tomcat-coyote.jar:9.0.10]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.10]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.10]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
Caused by: java.lang.RuntimeException: IocBean[userStageDataService] fail at field=[helloService]
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138) ~[nutz-1.r.66.jar:1.r.66]
... 52 more
Caused by: org.nutz.ioc.IocException: IocBean[helloService] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138) ~[nutz-1.r.66.jar:1.r.66]
... 52 more
Caused by: org.nutz.lang.InvokingException: Fail to invoke [org.nutz.integration.dubbo.ReferenceBean].get() by args:
For the reason: org/apache/zookeeper/KeeperException$NoNodeException
at org.nutz.lang.Invoking.invoke(Invoking.java:195) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.lang.Mirror.invoke(Mirror.java:1132) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:80) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:78) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:117) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138) ~[nutz-1.r.66.jar:1.r.66]
... 52 more
Caused by: java.lang.NoClassDefFoundError: org/apache/zookeeper/KeeperException$NoNodeException
at com.alibaba.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.connect(CuratorZookeeperTransporter.java:26) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter$Adaptive.connect(ZookeeperTransporter$Adaptive.java) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.<init>(ZookeeperRegistry.java:69) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistryFactory.createRegistry(ZookeeperRegistryFactory.java:37) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.registry.support.AbstractRegistryFactory.getRegistry(AbstractRegistryFactory.java:95) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.registry.RegistryFactory$Adaptive.getRegistry(RegistryFactory$Adaptive.java) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:269) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:63) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:98) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:63) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:394) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:333) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:163) ~[dubbo-2.6.1.jar:2.6.1]
at org.nutz.integration.dubbo.ReferenceBean.get(ReferenceBean.java:152) ~[nutz-integration-dubbo-1.r.66.jar:1.r.66]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_201]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_201]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_201]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_201]
at org.nutz.lang.Invoking$NullArgInvoker.invoke(Invoking.java:77) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.lang.Invoking.invoke(Invoking.java:192) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.lang.Mirror.invoke(Mirror.java:1132) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:80) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:78) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:117) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138) ~[nutz-1.r.66.jar:1.r.66]
... 52 more
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException$NoNodeException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1309) ~[catalina.jar:9.0.10]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1138) ~[catalina.jar:9.0.10]
at com.alibaba.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.connect(CuratorZookeeperTransporter.java:26) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter$Adaptive.connect(ZookeeperTransporter$Adaptive.java) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.<init>(ZookeeperRegistry.java:69) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistryFactory.createRegistry(ZookeeperRegistryFactory.java:37) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.registry.support.AbstractRegistryFactory.getRegistry(AbstractRegistryFactory.java:95) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.registry.RegistryFactory$Adaptive.getRegistry(RegistryFactory$Adaptive.java) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:269) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:63) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:98) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:63) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:394) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:333) ~[dubbo-2.6.1.jar:2.6.1]
at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:163) ~[dubbo-2.6.1.jar:2.6.1]
at org.nutz.integration.dubbo.ReferenceBean.get(ReferenceBean.java:152) ~[nutz-integration-dubbo-1.r.66.jar:1.r.66]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_201]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_201]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_201]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_201]
at org.nutz.lang.Invoking$NullArgInvoker.invoke(Invoking.java:77) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.lang.Invoking.invoke(Invoking.java:192) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.lang.Mirror.invoke(Mirror.java:1132) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:80) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:78) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:117) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67) ~[nutz-1.r.66.jar:1.r.66]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138) ~[nutz-1.r.66.jar:1.r.66]
... 52 more