文/朱季谦 遇到一个很诡异的问题,我在启动多个配置相同zookeeper的Dubbo项目时,其他项目都是正常启动,唯独有一个项目在启动过程中,Dubbo注册zookeeper协议时,竟然出现了这样的异常提示-- Caused by: java.lang.IllegalStateException: zookeeper not connected at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.<init>…
首先,黑体标出 官方不推荐使用web容器进行dubbo的启动 但是,有些时候,我们不采用他们的建议. 背景: 之前用的dubbo项目,是由main函数启动的,每次发布项目,需要启动两项: 1. tomcat启动web项目:2. jar 启动 dubbo 项目. 调整目标:使用 tomcat 启动 web + dubbo 项目,一次启动. 代码在上一篇文章的示例代码上进行改造. http://www.cnblogs.com/fri-yu/p/5981436.html 那么,根据官方的提示,我们使用…
问题: 在Eclipse中运行Web项目Jsp网页启动Tomcat时提示端口被占用: Several ports (8005, 8080, 8009) required by Tomcat v9.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this…
明明使用的是1.8jdk,但是运行项目时提示使用的是java版本是1.5,版本过低. 修改pom.xml,添加如下: <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.1</version> <configuration> <source>1.8</source>…
部署项目到weblogic中出现一个“黄叹号!”.报错如下: (1) Deployment is out of date due to changes in the underlying project contents. You'll need to manually 'Redeploy' the project to update the deployed archive. (2)Deployment failure on weblogic 8. Could not copy all res…
ps aux | grep nginx /bin/systemctl stop nginx.service /bin/systemctl start nginx.service /bin/systemctl restart nginx.service /bin/systemctl reload nginx.service 提示错误:Job for nginx.service failed because the control process exited with error code. Se…
严重: Servlet [springDispatcher] in web application [/dubbo-service] threw load() exception java.io.IOException: invalid constant type: 15 at javassist.bytecode.ConstPool.readOne(ConstPool.java:1113) at javassist.bytecode.ConstPool.read(ConstPool.java:…
原创/朱季谦 首先,先提一个建议,在SpringBoot+Dubbo项目中,Dubbo配置注册中心设置的application命名name的值,最好使用xxx-xxx-xxx这样格式的,避免随便使用驼峰命名.因为使用驼峰命名法,在Spring的IOC容器当中,很可能会出现一些导致项目启动失败的坑,例如,会出现这样的异常报错: org.springframework.beans.factory.BeanCreationException: Error creating bean with name…
一.Dubbo的注解配置 在Dubbo 2.6.3及以上版本提供支持. 1.@Service(全路径@org.apache.dubbo.config.annotation.Service) 配置服务提供方用以暴露服务,添加于api接口的实现类上,并可通过注解提供的属性进一步定制化服务. 其中比较重要的属性有: @Service只能定义在一个类上,用以提供一个服务的具体实现 interfaceClass:指定服务提供方实现的interface的类 interfaceName:指定服务提供方实现的i…
下面我们来看下开源dubbo推荐的业界成熟的zookeeper做为注册中心, zookeeper是hadoop的一个子项目是分布式系统的可靠协调者,他提供了配置维护,名字服务,分布式同步等服务.对于zookeeper的原理本文档不分析,后面有时间在做专题. zookeeper注册中心 Zookeeper对数据存储类似linux的目录结构,下面给出官方文档对dubbo注册数据的存储示例 假设读者对zookeeper有所了解,能够搭建zookeeper服务,其实不了解也没关系,谷歌百度下分分钟搞起.…