Java.sql.SQLException:Incorrect string value: ' \xf0\x9f\x9a\x80\xf0\x9f ... ' for column ' name ' at row 1

Source: Internet
Author: User

1. Exception prompt:

12:59:10.000 [http-nio-8080-exec-40] DEBUG o.s.j.s.sqlstatesqlexceptiontranslator-extracted SQL Stateclass' HY ' from value ' HY000 ' 12:59:10.000 [http-nio-8080-exec-40] DEBUG org.mybatis.spring.SqlSessionUtils-Closing Non transactional sqlsession [[email protected]]12:59:10.000 [http-nio-8080-exec-40] DEBUG o.s.jdbc.datasource.datasourceutils-returning JDBC Connection to DataSourceorg.springframework.jdbc.UncategorizedSQLException: # # # Error updating Database. Cause:java.sql.SQLException:Incorrect String Value:' \xf0\x9f\x9a\x80\xf0\x9f ... ' forColumn ' name ' at row 1# # # The error may involve Com.artup.mapper.MemberMapper.insertMember-inline### the error occurred whilesetting parameters### Sql:insert into Bud_member (db_id, CREATED_DT, name, code, sex, client, open_id, union_id , Province_code, City_code, County_code, Headimgurl, Activity_code, Is_subscribe) VALUES (?, now (),? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?) # # # Cause:java.sql.SQLException:Incorrect String value:' \xf0\x9f\x9a\x80\xf0\x9f ... ' forColumn ' name ' at row 1; Uncategorized SQLException forSQL []; SQL state [HY000]; Error code [1366]; Incorrect string value: ' \xf0\x9f\x9a\x80\xf0\x9f ... ' forColumn ' name ' at row 1; Nested exception is Java.sql.SQLException:Incorrect string value: ' \xf0\x9f\x9a\x80\xf0\x9f ... ' forColumn ' name ' at row 1At Org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate ( Abstractfallbacksqlexceptiontranslator.java:84) at Org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate ( Abstractfallbacksqlexceptiontranslator.java:81) at Org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate ( Abstractfallbacksqlexceptiontranslator.java:81) at Org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible ( Mybatisexceptiontranslator.java:71) at Org.mybatis.spring.sqlsessiontemplate$sqlsessioninterceptor.invoke (Sqlsessiontemplate.java:364) at Com.sun.proxy. $Proxy 349.insert (Unknown Source) at Org.mybatis.spring.SqlSessionTemplate.insert (Sqlsessiont Emplate.java:236) at Org.apache.ibatis.binding.MapperMethod.execute (Mappermethod.java:46) at Org.apache.ibatis.binding.MapperProxy.invoke (Mapperproxy.java:43) at Com.sun.proxy. $Proxy 355.insertMember (Unknown Source) at Com.smbea.service.MemberService.saveMember (members Ervice.java:39) at Com.smbea.activity.web.WeChatController.wechatPropellingApi (Wechatcontroller.java:455) at Sun.reflect.GeneratedMethodAccessor879.invoke (Unknown Source) at Sun.reflect.DelegatingMethodAccessorImpl. Invoke (Delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (Method.java:498) at Org.springframework.web.method.support.InvocableHandlerMethod.doInvoke (Invocablehandlermethod.java: 220) at Org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest ( Invocablehandlermethod.java:134) at Org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle ( Servletinvocablehandlermethod.java:116) at Org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod ( Requestmappinghandleradapter.java:827) at Org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal ( Requestmappinghandleradapter.java:738) at Org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle ( Abstracthandlermethodadapter.java:85) at Org.springframework.web.servlet.DispatcherServlet.doDispatch (Dispatcherservlet.java:963) at Org.springframework.web.servlet.DispatcherServlet.doService (Dispatcherservlet.java:897) at Org.springframework.web.servlet.FrameworkServlet.processRequest (Frameworkservlet.java:970) at Org.springframework.web.servlet.FrameworkServlet.doPost (Frameworkservlet.java:872) at Javax.servlet.http.HttpServlet.service (Httpservlet.java:661) at Org.springframework.web.servlet.FrameworkServlet.service (Frameworkservlet.java:846) at Javax.servlet.http.HttpServlet.service (Httpservlet.java:742) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:231) at Org.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:166) at Org.apache.tomcat.websocket.server.WsFilter.doFilter (Wsfilter.java:52) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:193) at Org.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:166) at Com.thetransactioncompany.cors.CORSFilter.doFilter (Corsfilter.java:208) at Com.thetransactioncompany.cors.CORSFilter.doFilter (Corsfilter.java:274) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:193) at Org.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:166) at Org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal (Characterencodingfilter.java: 197) at Org.springframework.web.filter.OncePerRequestFilter.doFilter (Onceperrequestfilter.java:107) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:193) at Org.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:166) at Org.apache.catalina.core.StandardWrapperValve.invoke (Standardwrappervalve.java:198) at Org.apache.catalina.core.StandardContextValve.invoke (Standardcontextvalve.java:96) at Org.apache.catalina.authenticator.AuthenticatorBase.invoke (Authenticatorbase.java:478) at Org.apache.catalina.core.StandardHostValve.invoke (Standardhostvalve.java:140) at Org.apache.catalina.valves.ErrorReportValve.invoke (Errorreportvalve.java:80) at Org.apache.catalina.valves.AbstractAccessLogValve.invoke (Abstractaccesslogvalve.java:624) at Org.apache.catalina.core.StandardEngineValve.invoke (Standardenginevalve.java:87) at Org.apache.catalina.connector.CoyoteAdapter.service (Coyoteadapter.java:342) at Org.apache.coyote.http11.Http11Processor.service (Http11processor.java:799) at Org.apache.coyote.AbstractProcessorLight.process (Abstractprocessorlight.java:66) at Org.apache.coyote.abstractprotocol$connectionhandler.process (Abstractprotocol.java:868) at Org.apache.tomcat.util.net.nioendpoint$socketprocessor.dorun (Nioendpoint.java:1455) at Org.apache.tomcat.util.net.SocketProcessorBase.run (Socketprocessorbase.java:49) at Java.util.concurrent.ThreadPoolExecutor.runWorker (Threadpoolexecutor.java:1142) at Java.util.concurrent.threadpoolexecutor$worker.run (Threadpoolexecutor.java:617) at Org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run (Taskthread.java:61) at Java.lang.Thread.run (Thread.java:748) caused By:java.sql.SQLException:Incorrect string value:' \xf0\x9f\x9a\x80\xf0\x9f ... ' forColumn ' name ' at row 1At com.mysql.jdbc.SQLError.createSQLException (Sqlerror.java:1074) at Com.mysql.jdbc.MysqlIO.checkErrorPacket (Mysqlio.java:4074) at Com.mysql.jdbc.MysqlIO.checkErrorPacket (Mysqlio.java:4006) at Com.mysql.jdbc.MysqlIO.sendCommand (Mysqlio.java:2468) at Com.mysql.jdbc.MysqlIO.sqlQueryDirect (Mysqlio.java:2629) at Com.mysql.jdbc.ConnectionImpl.execSQL (Connectionimpl.java:2719) at Com.mysql.jdbc.PreparedStatement.executeInternal (Preparedstatement.java:2155) at Com.mysql.jdbc.PreparedStatement.execute (Preparedstatement.java:1379) at Com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute (Filterchainimpl.java:2929) at Com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute (Filtereventadapter.java:440) at Com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute (Filterchainimpl.java:2927) at Com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute (Preparedstatementproxyimpl.java:94) at Com.alibaba.druid.pool.DruidPooledPreparedStatement.execute (Druidpooledpreparedstatement.java:483) at Sun.reflect.GeneratedMethodAccessor206.invoke (Unknown Source) at Sun.reflect.DelegatingMethodAccessorImpl. Invoke (Delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (Method.java:498) at Org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke (Preparedstatementlogger.java:55) at Com.sun.proxy. $Proxy 211.execute (Unknown Source) at Org.apache.ibatis.executor.statement.PreparedStatementH Andler.update (Preparedstatementhandler.java:41) at Org.apache.ibatis.executor.statement.RoutingStatementHandler.update (Routingstatementhandler.java:66) at Org.apache.ibatis.executor.SimpleExecutor.doUpdate (Simpleexecutor.java:45) at Org.apache.ibatis.executor.BaseExecutor.update (Baseexecutor.java:100) at Org.apache.ibatis.executor.CachingExecutor.update (Cachingexecutor.java:75) at Org.apache.ibatis.session.defaults.DefaultSqlSession.update (Defaultsqlsession.java:148) at Org.apache.ibatis.session.defaults.DefaultSqlSession.insert (Defaultsqlsession.java:137) at Sun.reflect.GeneratedMethodAccessor869.invoke (Unknown Source) at Sun.reflect.DelegatingMethodAccessorImpl. Invoke (Delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (Method.java:498) at Org.mybatis.spring.sqlsessiontemplate$sqlsessioninterceptor.invoke (Sqlsessiontemplate.java:354) 2, Reason: we from

This tip indicates that the value of the field name is a non-resolvable data, often special characters, such as emoticons, that prevent data from being inserted into the data table.

3. Workaround: Encode the parameter of the name attribute or filter out the characters that cannot be processed.

Java.sql.SQLException:Incorrect string value: ' \xf0\x9f\x9a\x80\xf0\x9f ... ' for column ' name ' at row 1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.