分布式项目中一些常见的问题
来源:互联网 发布:寻侠境界突破数据 编辑:程序博客网 时间:2024/05/16 19:49
错误1.-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.
发生场景:将maven工程安装到本地仓库中时
解决方法:windows—>preferences—->java—>Installed JREs
选择对应的JDK 然后再编辑里Default VM Arguments里添加
-Dmaven.multiModuleProjectDirectory=$M2_HOME
错误2:HTTP Status 500 - Request processing failed; nested exception is java.lang.RuntimeException: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByPrimaryKey
发生场景:在测试通过ID获取商品信息的时候
原因:由于在dao层中TbItemMapper.xml这些配置文件没有被读取
解决方法:在pom.xml文件中如下配置
<build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> </resources> </build>
错误3:HTTP Status 500 - Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method findItem in the service com.ldh.service.ItemService. Tried 3 times of the providers [192.168.25.1:20880] (1/1) from the registry 127.0.0.1:2181 on the consumer 192.168.25.1 using the dubbo version 2.5.3. Last error is: Failed to invoke remote method: findItem, provider: dubbo://192.168.25.1:20880/com.ldh.service.ItemService?anyhost=true&application=ldh-manager-web&check=false&dubbo=2.5.3&interface=com.ldh.service.ItemService&methods=findItem&pid=6152&revision=0.0.1-SNAPSHOT&side=consumer&timeout=300000×tamp=1505723800649, cause: Failed to send response: Response [id=2, version=2.0.0, status=20, event=false, error=null, result=RpcResult [result=com.taotao.pojo.TbItem@2912e8be, exception=null]], cause: java.lang.IllegalStateException: Serialized class com.taotao.pojo.TbItem must implement java.io.Serializable
发生场景:在测试通过ID获取商品信息的时候
原因:TbItem must implement java.io.Serializable,显然是TbItem这个类需要实现序列化接口,因为在网络传输的时候,类都需要实现序列化接口
解决方法:实现序列化接口
错误4:在启动zookeeper时,发生闪退
解决方法:E:\zookeeper-3.4.6\conf目录下,有一个cfg文件,将其名字改成zoo.cfg即可
- 分布式项目中一些常见的问题
- 项目中常见的一些问题
- 分布式项目中遇到的一些问题:记录
- 一些css中常见的问题!
- Java字符串中常见的一些问题
- 求职简历中一些常见的问题
- 求职简历中一些常见的问题
- 求职简历中一些常见的问题
- 项目中常见的乱码问题
- hightcharts项目中常见的问题总结
- 一些常见的问题
- Android Studio导入Eclipse项目和一些常见的问题
- 项目中遇到的一些常见知识点(1)
- erlang分布式开发中遇到的一些问题
- 项目中遇到的一些小问题
- 项目中遇到的一些小问题
- 项目中遇到的一些小问题
- 项目过程中遇到的一些问题
- 26:字符串最大跨距(1.7编程基础之字符串)
- 静态持续变量
- Invalid name: "@types/node"
- JS获取某年某月的总天数
- Tp框架实现好看分页效果
- 分布式项目中一些常见的问题
- 几类特殊的IP地址,全0,全1的组合使用情况
- 11-变量作用域
- history.go(-1)和history.back()的区别
- 安装vsftp并设置被动模式
- 项目记忆
- 横竖屏切换
- 内存管理理解
- Android 关于selector中state_pressed="true"的位置顺序