工作中遇到的问题
文章平均质量分 71
周虽旧邦其命维新
剑气纵横三万里 一剑光寒十九洲
展开
-
2023工作中遇到问题一
工作问题笔记原创 2023-11-30 14:52:48 · 725 阅读 · 0 评论 -
工作环境后端构建部署优化
1、使用Maven的并发构建功能来加快构建速度。在执行mvn clean install命令时,可以使用-T参数指定并发线程数。后端项目模块越来越多,构建部署速度越来越慢,想办法进行构建部署速度上的优化。2、优化启动脚本,并发启动微服务模块。原创 2023-06-14 07:20:18 · 102 阅读 · 0 评论 -
2022工作中遇到问题五
工作中遇到的问题原创 2022-10-10 09:54:05 · 868 阅读 · 0 评论 -
2022工作中遇到的问题四
工作中遇到的问题排查原创 2022-07-04 17:37:58 · 1278 阅读 · 0 评论 -
2022工作中遇到问题三
工作中遇到的问题记录原创 2022-04-26 11:08:56 · 2480 阅读 · 0 评论 -
flyway使用注意事项与问题排查
项目中引入flyway后,部署时经常出现启动失败,而部分开发和运维对flyway并不了解,不能正确的进行错误排查,因此编写了这个文档,列出开发和运维分别需要遵守的使用规范,以及报错后如何排查原创 2022-04-25 11:05:53 · 5946 阅读 · 0 评论 -
2022工作中遇到的问题二
工作中遇到的问题原创 2022-03-08 08:13:46 · 1234 阅读 · 0 评论 -
2022工作中遇到问题一
1、tensorflow-gpu国内下载地址https://pypi.tuna.tsinghua.edu.cn/simple/tensorflow-gpu/2、@FeignClient远程调用无反应问题@FeignClient远程调用没有错误日志,请求也未发到远程服务,也未阻塞java.lang.RuntimeException: com.netflix.client.ClientExceptionorg.springframework.cloud.openfeign.ribbon.LoadBa原创 2022-01-14 09:53:42 · 791 阅读 · 0 评论 -
iview笔记
iview input校验rules如果是数字,要加上type: ‘integer’Alert 警告提示自定义图标大小等<Alert style="height: 50px;padding-top:16px;" show-icon> <Icon style="font-size: 26px" type="ios-information-circle-outline" slot="icon"></Icon> <span style="font-原创 2021-09-08 16:12:47 · 416 阅读 · 0 评论 -
kubernetes官方java客户端序列化问题
问题描述A为中台项目,B为节点项目,B通过client-java-api.jar获取prometheus监控数据,A通过接口调用定时获取节点监控信息,A、B项目均为springboot项目。开发过程中,A调用B接口失败,查看A项目日志,B接口返回500,查看B项目日志有错误信息如图所示:问题分析B返回json数据给A项目需要经过对象序列化成json,springboot接口序列化默认使用Jackson,而k8s client-java-api.jar包返回的对象中有IntOrString类型,值为原创 2021-04-23 13:14:44 · 297 阅读 · 0 评论 -
记一次生产故障问题排查
故障现象:org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2查看数据库数据,符合条件的数据有两条。方法上有声明式事务,同事代码具体逻辑如下:1.条件查询xxx_deploy表,结果不为空则返回;2.结果为空,trylock,有效时间3s;3.加锁成功,条件查询xxx_deploy表;4.结果原创 2021-03-29 16:26:32 · 311 阅读 · 0 评论 -
zookeeper和kafka常用命令
zookeeper操作目录下:查看zookeeper状态./zkServer.sh status连接zookeeper,在bin目录下执行./zkCli.sh(默认连接localhost:2181)./zkCli.sh -server localhost:2191(指定ip端口号连接)创建节点,必须添加数据才能创建成功create /msgprocess/icpush test查...原创 2020-04-16 14:47:25 · 615 阅读 · 0 评论 -
oracle存储过程
定义oracle存储过程:CREATE OR REPLACEPROCEDURE "V111111" ASBEGINfor x in 1 .. 200 loopbeginINSERT INTO test_index ("ID", "FLOW_CODE", "CREATE_DATE") VALUES (SEQ_XXX.NEXTVAL, '100000' + x, TO_DATE('20...原创 2020-04-16 14:39:10 · 190 阅读 · 0 评论 -
java开发工作笔记(前端)
一、jquery动态设置标签隐藏和显示$("#id").css('display','none');$("#id").css('display','block');某些情况下动态调整标签为block可见后会扰乱页面布局,这时候可以使用如下设置:$("#id").css('display','');二、表格td内容过多时隐藏.table tr td { tex...原创 2020-03-19 22:02:35 · 166 阅读 · 0 评论 -
项目启动报错NestedIOException: ASM ClassReader failed to parse class file
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\project\tydic\ICServer\ic-process\target\classes\com\tydic\ic\process\mess...原创 2019-09-02 17:57:46 · 1415 阅读 · 0 评论 -
使用shell登录ftp服务器判断文件服务器是否可用
由于上线后项目出现com.jcraft.jsch.JSchException: session is down错误,为了验证生产环境sftp是否可用,于是现学现教现场工作人员使用telnet命令尝试登录sftp服务器shell连接ftptelnet 192.168.128.89 21随意输入字符串123后提示输入用户名密码输入user 用户名,回车再输入pass...原创 2019-08-30 18:35:04 · 830 阅读 · 0 评论 -
svn客户端版本升级到12.2报错the working copy is too old you need to upgrade the working copy first
最近由于svn发现新漏洞,公司要求大家升级Svn版本到12.2,升级后idea提交代码报错the working copy is too old xxx to work with client version xxx. you need to upgrade the working copy first网上查资料说在目录下执行svn upgrade可以解决该问题,还有一些博客说svn或idea...原创 2019-08-20 10:45:53 · 1436 阅读 · 0 评论 -
定义webservice接口服务端
web.xml配置<servlet> <servlet-name>xxx</servlet-name> <servlet-class> org.apache.cxf.transport.servlet.CXFServlet </servlet-class> <load-on-startup&g...原创 2019-08-15 18:37:10 · 1323 阅读 · 0 评论 -
使用for循环调用HttpClient只执行了前三次就不再执行
使用httpclient循环调用测试接口,但是执行了两三次后就没有继续执行。代码如下:CloseableHttpClient httpclient = HttpClients.createDefault(); HttpGet httpGet = new HttpGet("xxxUrl"); CloseableHttpResponse response = nu...原创 2019-07-22 10:27:56 · 3015 阅读 · 4 评论 -
java开发日常工作笔记
一、查看sql内容在项目中mybatis日志打印级别配置文件修改日志打印级别后仍然没有打印sql,但是另一半运维急需sql,通过断点在com.ibatis.sqlmap.engine.mapping.statement.MappedStatement#executeQueryWithCallback查看变量sqlString的值获得sql内容。二、mysql查询写入效率过慢问题项目...原创 2019-07-19 10:21:30 · 1062 阅读 · 0 评论 -
日志写入xml上传ftp遇到的问题
一、dom4j写入xmladdElement添加标签元素,添加Element标签中文本内容addTextaddAttribute(String name, String value)添加标签属性二、上传ftpftpClient.changeWorkingDirectory一直返回false,原因是目录不存在ftpClient.makeDirectory失败,原因是ftp仅支持逐级创...原创 2019-07-19 09:40:09 · 442 阅读 · 0 评论 -
SQLSyntaxErrorException: ORA-01747: user.table.column, table.column 或列说明无效
项目启动报错:Caused by: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in sql/sql_audit_data.xml. --- The error occurred while applying a parameter map. --- Check the g...原创 2019-07-15 18:45:40 · 1039 阅读 · 0 评论 -
spring mybatis项目启动报错There is no READABLE property named 'xx' in class
在xml中新增一个update方法后项目启动报错,刚开始由于日志刷的很多,一时没发现关键错误信息,后来一直往上翻才看到真正的错误:Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMap/update'. Cause: com.ibatis.common.beans.ProbeException: There is...原创 2019-07-02 17:50:49 · 2392 阅读 · 0 评论 -
sql操作oracle报错,date相关错误
报错信息:ORA-01830: date format picture ends before converting entire input string报错sql片段:is not null and (to_date(字段名,'yyyy-MM-dd')+1) > sysdate报错原因:数据库中存储有时分秒的数据识别不了解决:修改sql片段为:is not null an...原创 2019-07-01 18:17:55 · 952 阅读 · 0 评论 -
使用多个tomcat如何修改端口号
一、找到tomcat下conf文件夹下server.xml;二、修改8080端口三、修改8009端口四、修改8005端口修改后同时启动多个tomcat成功。原创 2019-06-20 17:07:48 · 1450 阅读 · 0 评论 -
JDK1.7启动项目报错Unsupported major.minor version 52.0
Caused by: java.lang.UnsupportedClassVersionError: org/springframework/context/annotation/ClassPathBeanDefinitionScanner : Unsupported major.minor version 52.0 (unable to load class org.springframewor...原创 2019-06-14 17:59:01 · 1360 阅读 · 0 评论 -
mysql连接数据库报错:java.sql.SQLException: The server time zone value
错误信息:java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezo...原创 2019-05-29 14:02:02 · 385 阅读 · 0 评论 -
mybatis-plus通用mapper调用报错:Invalid bound statement
使用springboot整合mybatis-plus后,调用自定义的方法正常,调用BaseMapper中自带的方法报错如下:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cn.rkang.enterprise.mapper.EmployeeInfoMapper.selectOne...原创 2019-05-15 15:32:56 · 8124 阅读 · 3 评论 -
BeanUtils.copyProperties()拷贝id属性失败
po类中id有值,但是使用BeanUtils.copyProperties()拷贝出的vo类id属性为null,检查后发现是因为po继承的父类声明了一个泛型,部分代码如下:public abstract class AbstractEntity<ID extends Serializable> implements Serializable { protected ...原创 2019-05-13 10:39:24 · 3926 阅读 · 0 评论 -
使用git命令行把本地项目上传到远程仓库
一、在远程新建一个repository;二、打开命令行进入项目目录下,初始化本地仓库git init三、关联远程仓库和本地仓库git remote add origin http://gogs.xxx.com.cn/xxx/enterprise.git四、添加项目到暂存区git add .五、提交项目git commit -m "xxx重写项目第一次提交"六、推...原创 2019-05-10 17:45:13 · 686 阅读 · 0 评论 -
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cn.xx.mapper.XX.xxx
项目访问接口报错:排查发现mapper文件没有编译进target,mapper目录下只有class文件没有mapper.xml:解决方法:在build标签中使用<resources>标签指向mapper.xml文件位置<build> <plugins> <plugin> <g...原创 2019-05-10 14:20:11 · 183 阅读 · 0 评论 -
项目启动报错:Caused by: java.lang.IllegalStateException: Cannot load driver class: com.mysql.jdbc.Driver
项目启动失败,报错如下:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/aut...原创 2019-05-10 10:56:54 · 7431 阅读 · 0 评论 -
mapper找不到报错:Field xxxMapper in xxx required a bean of type 'xxxMapper' that could not be found
搭建springboot项目整合ssm框架后,启动报错:Field xxxMapper in xxx.service.impl.xxxServiceImpl required a bean of type 'xxx.mapper.xxxMapper' that could not be found.The injection point has the following annotati...原创 2019-05-10 10:46:05 · 21440 阅读 · 0 评论 -
Docker日志那点事
一套软件系统的整个生命周期中,其中超过80%的时间都是在运维。运维中有几块不可缺,其中监控和日志,虽然没有这么复杂,但却是运维的基础。docker的出现,颠覆了原基础架构以及应用部署的模式。今天聊一下docker环境的日志。我们先准备个测试环境先在我们的docker host上起一个tomcat的容器输入命令docker search tomcat我们选择STARS最高的一...转载 2019-05-05 17:00:19 · 248 阅读 · 0 评论 -
启动项目elasticsearch连接报错:NoNodeAvailableException: None of the configured nodes are available: []
[10:15:22|ERROR|(cn.rkang.flame.dubbo.rpc.filter.ExceptionInterceptorFilter)]=[ [DUBBO] dubbo://xxx:20880/xxx.service.search.service.SearchService?anyhost=true&application=rkang-all-services&d...原创 2019-05-05 14:51:31 · 688 阅读 · 0 评论 -
linux启动tomcat后,浏览器访问不到
tomcat在linux启动后,通过浏览器访问tomcat项目端口,提示无法访问此网站172.19.145.65的响应时间过长。通过telnet命令测试172.19.145.65 8083端口是否可用,提示“telnet不是内部或外部命令,也不是可运行的程序”,需要在控制面板——启用或关闭windows功能中勾选telnet客户端C:\Users\amo>telnet ...原创 2019-05-05 10:35:37 · 1171 阅读 · 0 评论 -
dubbo消费者启动报错UnsatisfiedLinkError /jdk1.8.0_181/jre/lib/amd64/libawt_xawt.so: libXrender.so.1
dubbo消费者启动报错java.lang.UnsatisfiedLinkError: /usr/tools/jdk1.8.0_181/jre/lib/amd64/libawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory11:48:22.562 [localhost-...原创 2019-04-30 14:57:19 · 2470 阅读 · 0 评论 -
dubbo消费者启动报错:Found interface org.objectweb.asm.MethodVisitor, but class was expected
启动dubbo消费者服务的过程中报错,发现的是一个interface类,而需要的是一个class类,日志打印错误信息如下:09:57:20.039 [New I/O worker #1] WARN com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult - [DUBBO] Decode rpc result failed: Fou...原创 2019-04-30 13:32:40 · 5098 阅读 · 0 评论 -
dubbo提供者报错Decode argument[1] failed: java.lang.String cannot be cast to java.util.SortedMap
dubbo消费者在启动的过程中,提供者报错如下:[11:14:12|WARN |(com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation)]=[ [DUBBO] Decode argument[1] failed: java.lang.String cannot be cast to java.util.SortedMap, d...原创 2019-04-29 15:38:49 · 1949 阅读 · 0 评论 -
dubbo消费者调用报错java.lang.RuntimeException: You must use at least one, but no more than one http method
服务提供者启动成功后,启动消费者时报错:com.alibaba.dubbo.registry.integration.RegistryDirectory - [DUBBO] Failed to refer invoker for interfaceYou must use at least one, but no more than one http method annotation ...原创 2019-04-28 15:55:05 · 2629 阅读 · 0 评论