Java异常
cq__ht
坚持每一天努力一点点,总有一天你会发现其实很简单
展开
-
HttpMessageNotReadableException
org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected character (’"’ (code 34)): was expecting comma to separate Object entries; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected charac原创 2020-09-01 17:18:03 · 1729 阅读 · 0 评论 -
请求参数异常 HttpMessageConversionException
org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class com.longyao.petrochina.authorization.entity.po.UserPo]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot原创 2020-08-21 10:44:23 · 8393 阅读 · 0 评论 -
@Vaild失效处理
1.引入包没有引入完整javax.validationvalidation-apiorg.hibernatehibernate-validator${hibernate-validator.version}2.@Valid前面又@RequestBody可能失效 交换位置3.全局拦截/*** 处理参数验证异常** @param ex 参数异常对象* @return 封装好的返回数据*/@ExceptionHandler(BindException.class)@Respo原创 2020-08-20 18:01:03 · 537 阅读 · 0 评论 -
com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get
com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction数据库死锁导致:解决方法:1.最简单,直接重启服务器,重新构建项目2.根本上解决问题,@Transaction(noRollbackFor = MySQLTransactionRollbackException.clas)..原创 2020-05-20 16:33:45 · 3576 阅读 · 0 评论 -
NestedServletException之NoClassDefFoundError
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: com/keyway/jpt/common/api/dto/goods/CatsDto$CatsDtoBuilder这类问题看字面意思就是...原创 2020-04-28 10:28:03 · 1071 阅读 · 0 评论 -
org.springframework.beans.factory.annotation.Autowired
jpt-client-goods:192.168.13.5:30011] [,] 2020-03-26 14:43:38.486 ERROR 10300 [main] org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter***************************APPLICATION FAILED ...原创 2020-03-26 15:07:29 · 1408 阅读 · 0 评论 -
nested exception is java.lang.IllegalStateException: Failed to introspect Class
2020-01-16 08:57:43.329 WARN 6664 — [on(3)-127.0.0.1] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework....原创 2020-01-16 12:41:21 · 9566 阅读 · 0 评论 -
常见异常基本处理 FileNotFoundException
.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/config/application.properties]直接再现异常看到这个异常,我们一般都知道找不到文件,但是我们已经用application.yml代替了了application.properties文件,为什么还要包这个错误啊!既然是配置...原创 2019-11-16 13:40:59 · 2010 阅读 · 0 评论 -
java程序访问URL,get和post方法链接异常
java.net.SocketException: Unexpected end of file from serverat sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)at sun.net.www.http...原创 2019-01-25 09:22:13 · 1215 阅读 · 0 评论