Recently, I used an XML file to send a stream file to insert it into the database. It took a long time to locate the bug because of intermediate encryption, transcoding, and a bunch of operations, the final reason is that the table creation brothers do not know how to do this. Some fields are followed by character set definitions.
Character Set Latin1
As a result
Java. SQL. sqlexception: incorrect string value: '\ xe6 \ xa3 \ xb0 \ xe6 \ xbf \ x8b... 'For column' songname' at Row 1 query: insert into 'x52 _ homeland_s1 '. 'musicinfo' ('mode2', 'modes ', 'mode1', 'duration', 'bpm', 'levelinfoid', 'songi', 'songname', 'oggi ', 'singer', 'alipay', 'status', 'updatetime', 'createtime', 'tags') values ('0', '64; ', '0 ', '123', '123', '123', '123', 'hangzhou Hangzhou (Hangzhou) ', '123', 'hangzhou becomes a hangzhou ','', '0', '2017-01-01 08:00:01. 0', '2017-01-01 08:00:01. 0', '2017; 105; 201; 301; 401; ') parameters: [] At Org. apache. commons. dbutils. abstractqueryrunner. rethrow (abstractqueryrunner. java: 320) at Org. apache. commons. dbutils. queryrunner. update (queryrunner. java: 489) at Org. apache. commons. dbutils. queryrunner. update (queryrunner. java: 419) at framework. DB. dbmanager. insert (dbmanager. java: 209) at service. impl. idipserviceimpl. musicadd (idipserviceimpl. java: 2155) at framework.net. idipresponser. messagereceived (idipresponser. java: 684) at Org. apache. mina. core. filterchain. defaultiofilterchain $ tailfilter. messagereceived (defaultiofilterchain. java: 716) at Org. apache. mina. core. filterchain. defaultiofilterchain. callnextmessagereceived (defaultiofilterchain. java: 434) at Org. apache. mina. core. filterchain. defaultiofilterchain. accesskey $1200 (defaultiofilterchain. java: 46) at Org. apache. mina. core. filterchain. defaultiofilterchain $ entryimpl $1. messagereceived (defaultiofilterchain. java: 796) at Org. apache. mina. core. filterchain. iofilterevent. fire (iofilterevent. java: 75) at Org. apache. mina. core. session. ioevent. run (ioevent. java: 63) at org.apache.mina.filter.exe cutor. orderedthreadpoolexecutor $ worker. runtask (orderedthreadpoolexecutor. java: 780) at org.apache.mina.filter.exe cutor. orderedthreadpoolexecutor $ worker. runtasks (orderedthreadpoolexecutor. java: 772) at org.apache.mina.filter.exe cutor. orderedthreadpoolexecutor $ worker. run (orderedthreadpoolexecutor. java: 714) at java. lang. thread. run (thread. java: 662)
the solution is to delete and recreate the table.