
(7)...Error
IT云清
资深Java工程师,研发经理,公众号:java4all
-
原创 Gradle sync failed: Cause: com.intellij.util.containers.HashMap cannot be cast to com.intellij.util.
使用idea导入gradle项目,报这个错误:Gradle sync failed: Cause: com.intellij.util.containers.HashMap cannot be cast to com.intellij.util.containers.MultiMap而且搜索不到任何解决方案,Stack Overflow也没有,求知道的大佬支招啊。...2020-01-09 17:35:45457
2
-
原创 The bean 'counterFactory', defined in class path resource [org/springframework/cloud/netflix/zuul/Zu
SpringCloud启动zuul时,报如下错误:查询发现是Springboot的版本问题,我这里springbood版本是2.1.0,SpringCloud是F版本。把SpringBoot版本降到2.0.6即可。2018-11-29 15:54:38.127 INFO 30532 --- [ main] com.java4all.ZuulServer1Applicati...2018-11-29 16:17:447245
0
-
原创 Lock wait timeout exceeded; try restarting transaction
这个错误,应该是锁等待超时,事务长时间没有提交,导致了回滚。1.错误如下:org.springframework.dao.CannotAcquireLockException: ### Error updating database. Cause: java.sql.SQLException: Lock wait timeout exceeded; try restarting t...2018-09-04 14:37:255183
0
-
原创 list.remove()时出问题,集合的remove方法注意事项2
不要在 foreach 循环里进行元素的 remove/add 操作。 remove 元素请使用 Iterator 方式,如果并发操作,需要对 Iterator 对象加锁。 正例: List<String> list = new ArrayList<>(); list.add("1"); list.add("2&2018-07-23 14:49:35770
0
-
原创 Error contacting service. It is probably not running.
搭建zookeeper集群是发现了一个奇怪的现象: 问题:在同一台机器上,启动三个zookeeper,三个分别使用不同的配置文件,内容如下:tickTime=2000initLimit=10syncLimit=5dataDir=/usr/local/wang/zookeeper-3.4.8-3/datadataLogDir=/usr/local/wang/zookeeper-3.4....2018-06-14 10:52:07320
0
-
原创 Non-terminating decimal expansion; no exact representable decimal res
在使用BigDecimal做出发运算时,如果没有指定小数点位数,在除不尽的时候,就会出现java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.所以我们在使用出发时一定要记住指定一下位数,例如:a.divide(b,4),而不要写成a.di...2018-06-04 16:00:19232
0
-
原创 poi导出excel文件乱码
在使用poi导出xls和xlsx文件时,有时候会出现乱码,这个问题我分为两种情况,但是解决思路差不多。1.不使用模板如果我们在导出时,不使用提前存储的模板,那么下面的两种情况需要严格对应:.xls创建工作簿用:Workbook workbook = new HSSFWorkbook(); 文件类型设置:response.setCharacterEnco...2018-03-31 11:51:0912477
2
-
原创 SpringBoot整合Mybatis报错:Consider defining a bean of type ‘xx.xx.xx‘ in your configur
SpringBoot和mybatis整合完后,如果按照spring的整合习惯,可能会发现一个错误:APPLICATION FAILED TO START***************************Description:Field entFileDao in com.alibaba.serviceImpl.EntFileServiceImpl required a2018-01-26 20:29:1129993
2
-
原创 SQL---Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column '
数据库中插入数据或执行sql语句时一直报下面这个错误:Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on c...2017-12-27 17:45:154238
0
-
原创 Non-terminating decimal expansion; no exact representable decimal result.
Non-terminating decimal expansion; no exact representable decimal result.这个错误一般出现在BigDecimal的除法运算中2017-11-02 13:49:293122
0
-
原创 xml解析---MalformedByteSequenceException: 1 字节的 UTF-8 序列的字节 1 无效。
解析xml文件时,有时会出现如下的错误,是由于文件的编码格式造成的,信息如下:Nested exception: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 1 字节的 UTF-8 序列的字节 1 无效。解决方式也很简单,直接用记事本打开文件,另存为,然后选择utf-8格式保存即可。2017-11-10 15:26:453189
1
-
原创 [ERROR] Failed to execute goal on project jdong: Could not resolve dependencies for project jdong:ja
[ERROR] Failed to execute goal on project jdong: Could not resolve dependencies for project jdong:jar:1.0.3: Failure to find com.lowagie:itextasian:jar:1.0 in https://repo.maven.apache.org/maven2 wa2017-08-26 15:46:504613
0
-
原创 “Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on..
“Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project”?2017-08-29 23:18:214490
0
-
原创 项目启动就报空指针异常
在使用idea开发时,启动项目后直接报出空指针异常2017-08-28 15:37:164558
0
-
原创 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
新建的项目,index.jsp出现了:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path2017-09-04 19:41:36248
0
-
原创 Type 'com.itextpdf.text.List' does not have type parameter
Error:java:类型com.itextpdf.text.List不带有参数类型或者Type 'com.itextpdf.text.List' does not have type parameter这个问题,曾经在处理pdf时出现过,原因可能是list的包引入的不恰当。尝试引入下面的list试一下。import java.util.List;import ja2017-08-26 15:21:502474
0