{"id":678,"date":"2019-10-23T22:00:13","date_gmt":"2019-10-23T14:00:13","guid":{"rendered":"http:\/\/toradora.xyz\/?p=678"},"modified":"2019-10-23T22:00:13","modified_gmt":"2019-10-23T14:00:13","slug":"bug%e8%ae%b0%e5%bd%95%ef%bc%9aerror-creating-bean-with-name-xxx-defined-in-file","status":"publish","type":"post","link":"https:\/\/diuut.com\/?p=678","title":{"rendered":"BUG\u8bb0\u5f55\uff1aError creating bean with name &#8216;xxx&#8217; defined in file"},"content":{"rendered":"\n<p>\u8be5\u9879\u76ee\u6a21\u5757\u542f\u52a8\u65f6\u5728dubbo\u63a7\u5236\u53f0\u4e2d\u770b\u4e0d\u5230\u6ce8\u518c\u6210\u529f\uff0c\u62a5\u51fa\u4ee5\u4e0b\u9519\u8bef\u4ee3\u7801<\/p>\n\n\n\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\n\n21:51:41,326 DEBUG NioProviderMetadata:68 -  [DUBBO] Using the autodetected NIO constraint level: 0, dubbo version: 2.6.0, current host: 127.0.0.1\n21:51:41,417  WARN XmlWebApplicationContext:558 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'albumServiceImpl' defined in file [E:\\IDEA-workspace\\qingcheng\\qingcheng_parent\\qingcheng_service_goods\\target\\classes\\com\\qingcheng\\service\\impl\\AlbumServiceImpl.class]: Initialization of bean failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Fail to start server(url: dubbo:\/\/192.168.11.1:20881\/com.qingcheng.service.goods.AlbumService?anyhost=true&amp;amp;application=goods&amp;amp;bind.ip=192.168.11.1&amp;amp;bind.port=20881&amp;amp;channel.readonly.sent=true&amp;amp;codec=dubbo&amp;amp;dubbo=2.6.0&amp;amp;generic=false&amp;amp;heartbeat=60000&amp;amp;interface=com.qingcheng.service.goods.AlbumService&amp;amp;methods=add,findList,findById,update,findPage,delete,findAll&amp;amp;pid=10856&amp;amp;revision=1.0-SNAPSHOT&amp;amp;side=provider&amp;amp;timestamp=1571838700825) Failed to bind NettyServer on \/192.168.11.1:20881, cause: Failed to bind to: \/0.0.0.0:20881\n21:51:41,418 DEBUG DefaultListableBeanFactory:499 - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@f6b0fc2: defining beans [idWorker,dataSource,sqlSessionFactory,tk.mybatis.spring.mapper.MapperScannerConfigurer#0,transactionManager,org.springframework.transaction.config.internalTransactionalEventListenerFactory,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,dubbo,${dubbo.application},com.alibaba.dubbo.config.RegistryConfig,com.alibaba.dubbo.config.spring.AnnotationBean,org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,albumMapper,auditMapper,brandMapper,categoryBrandMapper,categoryMapper,goodsLogMapper,paraMapper,prefMapper,skuMapper,specMapper,spuMapper,templateMapper,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,albumServiceImpl,brandServiceImpl,categoryServiceImpl,paraServiceImpl,prefServiceImpl,skuServiceImpl,specServiceImpl,spuServiceImpl,templateServiceImpl]; root of factory hierarchy\n21:51:41,418 DEBUG DefaultListableBeanFactory:567 - Retrieved dependent beans for bean 'sqlSessionFactory': [albumMapper, auditMapper, brandMapper, categoryBrandMapper, categoryMapper, goodsLogMapper, paraMapper, prefMapper, skuMapper, specMapper, spuMapper, templateMapper]\n21:51:41,418 DEBUG DefaultListableBeanFactory:567 - Retrieved dependent beans for bean 'com.github.pagehelper.PageHelper#2383feea': [sqlSessionFactory]\n21:51:41,420 DEBUG DefaultListableBeanFactory:567 - Retrieved dependent beans for bean 'dataSource': [transactionManager]\n21:51:41,421 DEBUG DisposableBeanAdapter:318 - Invoking destroy method 'close' on bean with name 'dataSource'\n21:51:41,421 DEBUG DisposableBeanAdapter:246 - Invoking destroy() on bean with name 'com.alibaba.dubbo.config.spring.AnnotationBean'\n21:51:41,425 ERROR ContextLoader:316 - Context initialization failed\n<\/pre>\n\n\n\n<ul><li>\u6392\u9664\u6b65\u9aa4\uff1a<\/li><li>\u91cd\u65b0install\u591a\u6b21<\/li><li>\u6392\u67e5\u5305\u540d\u63a5\u53e3\u540d\u4e66\u5199<\/li><li>\u67e5\u770b\u7f16\u8bd1\u540e\u6587\u4ef6<\/li><li>\u67e5\u770bSpring\u914d\u7f6e\u6807\u6ce8\u5bfc\u5305\u662f\u5426\u6b63\u786e<\/li><\/ul>\n\n\n\n<p>\u91cd\u590d\u591a\u6b21\u540e\u53d1\u73b0\uff0c\u67d0\u4e00\u4e2aservice\u6a21\u5757\u80fd\u591f\u542f\u52a8\u6210\u529f\uff0c\u53e6\u4e00\u4e2a\u5c31\u65e0\u6cd5\u542f\u52a8\uff0c\u60f3\u5230\u662f\u7aef\u53e3\u51b2\u7a81\uff0c\u5219\u53bb\u6392\u67e5dubbo\u7aef\u53e3\u914d\u7f6e\u6587\u4ef6\uff0c\u7ed3\u679c\u53d1\u73b0\u63d0\u4f9b\u7684\u9879\u76ee\u6a21\u5757\u914d\u7f6e\u7aef\u53e3\u90fd\u4e00\u6837\u7684\uff0c\u6240\u4ee5\u5bfc\u81f4dubbo\u4e2dzookeeper\u53ea\u80fd\u6ce8\u518c\u6210\u529f\u4e00\u4e2a\uff0c\u4fee\u6539\u7aef\u53e3\u540e\u5219\u6210\u529f\u542f\u52a8\u6240\u6709\u6a21\u5757\u3002<\/p>\n\n\n\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\n\/\/dubbo.propertice\u914d\u7f6e\u6587\u4ef6\n\ndubbo.port=20885\ndubbo.application=config\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8be5\u9879\u76ee\u6a21\u5757\u542f\u52a8\u65f6\u5728dubbo\u63a7\u5236\u53f0\u4e2d\u770b\u4e0d\u5230\u6ce8\u518c\u6210\u529f\uff0c\u62a5\u51fa\u4ee5\u4e0b\u9519\u8bef\u4ee3\u7801 \u6392\u9664\u6b65\u9aa4\uff1a \u91cd\u65b0install\u591a\u6b21 \u6392\u67e5<span class=\"more-button\"><a href=\"https:\/\/diuut.com\/?p=678\" class=\"more-link\">view all . . .<span class=\"screen-reader-text\">BUG\u8bb0\u5f55\uff1aError creating bean with name &#8216;xxx&#8217; defined in file<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":615,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/posts\/678"}],"collection":[{"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/diuut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=678"}],"version-history":[{"count":0,"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/posts\/678\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/media\/615"}],"wp:attachment":[{"href":"https:\/\/diuut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/diuut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/diuut.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}