微信开发工具显示500

来源:10-9 微信登录帐号的创建下

hanshuo

2020-05-07

http://img.mukewang.com/szimg/5eb3685f0986272319110903.jpg

com.hanmeng.o2o.exceptions.WechatAuthOperationException: insertWechatAuth error: insertPersonInfo error:
### Error updating database.  Cause: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x94\x85' for column 'name' at row 1
### The error may involve com.hanmeng.o2o.dao.PersonInfoDao.insertPersonInfo-Inline
### The error occurred while setting parameters
### SQL: INSERT   INTO   tb_person_info(name,gender,email,profile_img,user_type,   create_time,last_edit_time,enable_status)   VALUES   (?,?,?,?,   ?,?,?,?)
### Cause: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x94\x85' for column 'name' at row 1
; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1366]; Incorrect string value: '\xF0\x9F\x94\x85' for column 'name' at row 1; nested exception is java.sql.SQLException: Incorrect string value: '\xF0\x9F\x94\x85' for column 'name' at row 1
com.hanmeng.o2o.service.impl.WechatAuthServiceImpl.register(WechatAuthServiceImpl.java:69)
sun.reflect.GeneratedMethodAccessor716.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)

写回答

2回答

hthonor

2020-09-01

我把昵称中的表情删掉就ok了,数据库的编码不支持表情

1
0

翔仔

2020-05-08

同学好,感觉是编码问题?打印一下当时的name看看 就是用户名,需要对比一下编码

0
2
hthonor
打印出日志,name显示正常
2020-09-01
共2条回复

Java双版本(SSM到SpringBoot)校园商铺全栈开发

SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需

5131 学习 · 8152 问题

查看课程