![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
异常
小小舍
这个作者很懒,什么都没留下…
展开
-
springboot自定义拦截器中使用redisTemplate的问题
错误:解决:把@Autowired换为@Resource项目运行成功。原创 2022-01-08 16:43:42 · 436 阅读 · 1 评论 -
微信分享url带多个参数问题解决
出现问题:发现url拼接多参数时,前端传过来的url的&变成&;了,如下图。导致生成签名时实际是用错误的url生成的签名,就和当前页面url不一致了,就出现问题config:invalid signature解决:用encodeURIComponent(uri)前端对url进行编码例如链接:http://域名/?channelSource=baidu&shareUserId=6&isMask=1&is_ck=1&shareU..原创 2022-01-08 10:11:58 · 2237 阅读 · 1 评论 -
Could not set property ‘id’ of ‘class com.xxxx.xxx.xxxx.entity.xxxxx’
在实体类 的id字段上加上 @TableId(value = "id",type = IdType.AUTO)原创 2021-09-30 17:58:57 · 466 阅读 · 0 评论 -
Bean named ‘xxx‘ is expected to be of type ‘xxx‘ but was actually of type ‘com.sun.proxy.$Proxy151‘
项目启动后报错信息如下:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creatin原创 2021-08-21 10:48:48 · 1996 阅读 · 0 评论 -
JSON parse error: Invalid UTF-8 start byte 0xa0;
错误时一脸懵逼,冷静下来仔细看报错。org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Invalid UTF-8 start byte 0xa0; nested exception is com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 start byte 0xa0 at [Source: (Pushbac原创 2021-07-28 10:03:35 · 9674 阅读 · 2 评论 -
Mybatis中mapper.xml参数为0时参数不生效问题
遇到问题时检查过程一开始不理解为什么,然后想起之前遇到过这个问题,那么就看一下sql对比发现当参数status是0时,不生效。mapper.xml中写法:改正后:验证一下:主要是因为参数为0时,xml中status !=''会将0排除了...原创 2021-07-27 15:35:07 · 882 阅读 · 1 评论 -
Java中double转BigDecimal时26.49->26.489999999999998436805981327779591083526611328125
异常情况如下:代码:更改后代码:原创 2021-04-20 18:42:00 · 94 阅读 · 0 评论 -
微信小程序解密encryptedData时 报错:pad block corrupted
小程序获取微信绑定的手机号时遇到异常:javax.crypto.BadPaddingException: pad block corrupted搜了很多看到一个类似的博文,突然意识到是因为自己的步骤不太对:先调用的wx.login获取code。 然后通过getPhoneNumber获取了手机号的加密数据。 再通过code取到用户的session_key 。 最后再用session_key,手机号的加密数据和向量解密获取手机号。正确的做法应该是:先才调用的wx.login获取code 然原创 2021-04-19 17:09:50 · 1468 阅读 · 0 评论 -
Caused by: com.alibaba.druid.sql.parser.ParserException:
异常截图:异常代码:public Integer AppointmentNum(int type,Integer accountId,Integer appletsAccountId){ StringBuilder builder = new StringBuilder("select count(*) from fwzl_appointment"); if (type==0){ builder.append("where to_days(createTime) = to_day原创 2020-10-21 10:41:46 · 2906 阅读 · 0 评论 -
java.lang.IllegalStateException: Unable to process parts as no multi-part configuration has been pro
测试文件上传报错发现postman的请求方式忘记改为post:正确是测试方式为:原创 2020-09-08 15:44:40 · 2143 阅读 · 0 评论 -
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '09d89e9444ae
当update时报错:com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '09d89e9444ae43269fcf924bd10a4297'错误代码: <update id="update" parameterType="com.ece.manager....原创 2020-05-02 18:30:41 · 387 阅读 · 0 评论 -
运行项目时警告: Establishing SSL connection without server's identity verificatio
只需在数据库链接加useSSL=false原创 2020-03-30 14:26:50 · 248 阅读 · 0 评论 -
Field error in object 'user' on field 'createDate': rejected value [2020-03-19]; codes [typeMismatch
Field error in object 'user' on field 'createDate': rejected value [2020-03-19]; codes [typeMismatch.user.createDate,typeMismatch.createDate,typeMismatch.java.util.Date,typeMismatch]; arguments [org....原创 2020-03-19 14:28:36 · 6540 阅读 · 0 评论 -
com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���ʱ��'
2020-03-19 13:49:41.021 ERROR 13164 --- [eate-1026036819] com.alibaba.druid.pool.DruidDataSource : create connection error, url: jdbc:mysql://localhost:3306/ssm, errorCode 0, state 01S00java.sql....原创 2020-03-19 14:00:14 · 878 阅读 · 0 评论 -
Http状态码406(Not Acceptable) 错误问题解决方法
状态码406:HTTP协议状态码的一种,表示无法使用请求的内容特性来响应请求的网页。说白了就是后台的返回结果前台无法解析就报406错误。状态码:406,请求头(Request Headers)中看到请求信息是json格式,响应头(Response Hraders)中却发现返回信息的格式是“text/html”,前台无法解析,需将结果转换成json格式返回给前台。更改前代码:更...原创 2019-12-18 11:51:48 · 25455 阅读 · 2 评论 -
java.lang.NegativeArraySizeException
1.了解:下标为负数所以出错了。2.实际应用:下标超出了。报错代码:byte[] buff = new byte[b[7]+2];查找原因:b只读取到4位,这里没有下标为7的值。 ...原创 2019-12-17 15:21:19 · 25860 阅读 · 0 评论 -
java.lang.NoSuchMethodException: cn.xxs.action.LoginAction.index()
错误信息:源代码:package cn.xxs.action;public class LoginAction extends BaseAction{ private String index() { getSession().setAttribute("userId", "10086"); getSess...原创 2019-03-19 22:43:57 · 358 阅读 · 0 评论 -
java.text.ParseException: Unparseable date: "2017-12-30"
源代码:修改方法:DateFormat df = new SimpleDateFormat("yyyy-MM-dd");就ok原创 2019-03-18 09:37:55 · 3122 阅读 · 0 评论 -
Oracle插入数据时出现“ ORA-14400: inserted partition key does not map to any partition”
错误代码:#列表分区create table studentTest2( s_id number(3) primary key, s_name varchar2(10))partition by list(s_name)( partition p1 values ('张三','张二'), partition p2 values ('张一','网一')...原创 2019-03-07 18:56:34 · 3758 阅读 · 0 评论 -
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build
新建web项目后,并没有出现默认的index.jsp,我就新建了一个jsp页面,出现jsp页面开头报错的情况。解决方案步骤:1.选中项目右击鼠标,找到Build Path,选中config buildpath2.在弹出的对话框 Libraries 选择框下,单击右边栏的Add Labrary3.选中Server Runtime --》 next4.选择配置过的http服...原创 2019-02-26 16:33:56 · 244 阅读 · 0 评论 -
java.lang.IllegalStateException
原代码:String name = req.getParameter("name"); String password = req.getParameter("password"); // 处理数据(service) CustomerService service = new CustomerServiceImp...原创 2019-01-11 16:52:08 · 191 阅读 · 0 评论 -
Server Tomcat v8.0 Server at localhost failed to start
错误图片:错误原因:CardAddServlet.java和CardDeleteServlet.java里这个位置都是CardAddServlet。处理错误方法:把CardDeleteServlet.java的CardAddServlet改为CardDeleteServlet就好了。(都怪自己太懒直接复制的上一个servlet,内容的这一细节给忽略了,而且我...原创 2019-01-11 00:12:42 · 883 阅读 · 1 评论 -
java.lang.IllegalStateException: Cannot forward after response has been committed
原代码: String name = req.getParameter("name"); String password = req.getParameter("password"); // 处理数据(service) CustomerService service = new CustomerSe...原创 2019-01-11 00:06:03 · 198 阅读 · 0 评论 -
localhost:8080 is already in use
错误信息:Port 8080 required by Tomcat v8.0 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server yo...原创 2019-03-29 19:57:59 · 37992 阅读 · 10 评论 -
Exception occurred during processing request: Write operations are not allowed in read-only mode (Fl
错误信息:严重: Exception occurred during processing request: Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker...原创 2019-03-28 19:57:44 · 1742 阅读 · 0 评论 -
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class
错误信息:解决方法:困扰了半天,搜了好多方法解决不了,最后请教一个大佬朋友解决了。1.找EclipseWorkSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\,看一下这个目录下的项目里边class 文件有没有 MessageQueueListener。发现根本没有tmp2,并且tmp0...原创 2019-08-13 17:19:34 · 1184 阅读 · 0 评论 -
org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'LastTime' i
报错信息:检查之后发现:pojo里边是小写的再去检查一下mapper的映射里边,就发现了一个问题。很粗心大意的一个问题,这里一定要对应好哦,不然就回出现我这样的问题。...原创 2019-08-29 17:10:23 · 152 阅读 · 0 评论 -
org.springframework.jdbc.BadSqlGrammarException:
报错信息:第一时间想起看mapper映射文件里更新的sql语句,果然所以,大家遇到错误一定要先看错误提示,然后找出问题所在,进行解决。一定要细心--------...原创 2019-08-29 19:42:41 · 1680 阅读 · 0 评论 -
org.json.JSONException: A JSONObject text must begin with '{' at 1 [characte
一看错误信息就是jaon格式不对。我用的是okhttp框架。错误写法:正确写法:原创 2019-08-29 19:47:52 · 1649 阅读 · 0 评论 -
Several ports (8005, 8080, 8009) required by Tomcat v8.0 Server at localhost are already in use.
项目刚启动就报错:解决办法:找到tomcat如下图目录,双击红框里的.bat后,重新运行就ok了。原创 2019-09-16 02:42:47 · 317 阅读 · 1 评论 -
org.apache.jasper.JasperException
源代码:修改后代码:就是这么神奇,下一次遇见一定不能粗心大意原创 2019-03-20 09:38:04 · 604 阅读 · 0 评论