C: \ Users \ Administrator \ Desktop \ defaultdb-mysql dedicated \ build. XML: 50: Org. dbunit. databaseunitexception: Java. SQL. sqlexception: incorrect string value: '\ xe3 \ X80 \ x8a \ xe8 \ XAE \ xbe... 'for column 'doccontent' at row 1at org.dbunit.ant.operation.exe cute (operation. java: 175) at org.dbunit.ant.dbunittask.exe cute (dbunittask. java: 272) at org.apache.tools.ant.unknownelement.exe cute (unknownelement. java: 291) at Sun. reflect. generatedmethodaccessor4.invoke (unknown source) at Sun. reflect. delegatingmethodaccessorimpl. invoke (delegatingmethodaccessorimpl. java: 25) at java. lang. reflect. method. invoke (method. java: 597) at org.apache.tools.ant.dispatch.dispatchutils.exe cute (dispatchutils. java: 106) at Org. apache. tools. ant. task. perform (task. java: 348) at org.apache.tools.ant.target.exe cute (target. java: 392) at Org. apache. tools. ant. target. performtasks (target. java: 413) at org.apache.tools.ant.project.exe cutesortedtargets (project. java: 1399) at org.apache.tools.ant.helper.singlecheckexecutor.exe cutetargets (singlecheckexecutor. java: 38) at org.apache.tools.ant.project.exe cutetargets (project. java: 1251) at org.apache.tools.ant.taskdefs.ant.exe cute (Ant. java: 442) at org.apache.tools.ant.taskdefs.calltarget.exe cute (calltarget. java: 105) at org.apache.tools.ant.unknownelement.exe cute (unknownelement. java: 291) at Sun. reflect. nativemethodaccessorimpl. invoke0 (native method) at Sun. reflect. nativemethodaccessorimpl. invoke (nativemethodaccessorimpl. java: 39) at Sun. reflect. delegatingmethodaccessorimpl. invoke (delegatingmethodaccessorimpl. java: 25) at java. lang. reflect. method. invoke (method. java: 597) at org.apache.tools.ant.dispatch.dispatchutils.exe cute (dispatchutils. java: 106) at Org. apache. tools. ant. task. perform (task. java: 348) at org.apache.tools.ant.target.exe cute (target. java: 392) at Org. apache. tools. ant. target. performtasks (target. java: 413) at org.apache.tools.ant.project.exe cutesortedtargets (project. java: 1399) at org.apache.tools.ant.project.exe cutetarget (project. java: 1368) at org.apache.tools.ant.helper.defaultexecutor.exe cutetargets (defaultexecutor. java: 41) at org.apache.tools.ant.project.exe cutetargets (project. java: 1251) at Org. apache. tools. ant. main. runbuild (main. java: 811) at Org. apache. tools. ant. main. startant (main. java: 217) at Org. apache. tools. ant. launch. launcher. run (launcher. java: 280) at Org. apache. tools. ant. launch. launcher. main (launcher. java: 109) Java. SQL. sqlexception: incorrect string value: '\ xe3 \ X80 \ x8a \ xe8 \ XAE \ xbe... 'for column 'doccontent' at row 1at COM. mySQL. JDBC. mysqlio. checkerrorpacket (mysqlio. java: 2928) at com. mySQL. JDBC. mysqlio. sendcommand (mysqlio. java: 1571) at com. mySQL. JDBC. serverpreparedstatement. serverexecute (serverpreparedstatement. java: 1124) at com.mysql.jdbc.serverpreparedstatement.exe cuteinternal (serverpreparedstatement. java: 676) at com.mysql.jdbc.preparedstatement.exe cute (preparedstatement. java: 773) at Org. dbunit. database. statement. simplepreparedstatement. addbatch (simplepreparedstatement. java: 67) at Org. dbunit. database. statement. automaticpreparedbatchstatement. addbatch (automaticpreparedbatchstatement. java: 57) at org.dbunit.operation.w.actbatchoperation.exe cute (abstractbatchoperation. java: 178) at org.dbunit.operation.compositeoperation.exe cute (compositeoperation. java: 67) at org.dbunit.ant.operation.exe cute (operation. java: 171) at org.dbunit.ant.dbunittask.exe cute (dbunittask. java: 272) at org.apache.tools.ant.unknownelement.exe cute (unknownelement. java: 291) at Sun. reflect. generatedmethodaccessor4.invoke (unknown source) at Sun. reflect. delegatingmethodaccessorimpl. invoke (delegatingmethodaccessorimpl. java: 25) at java. lang. reflect. method. invoke (method. java: 597) at org.apache.tools.ant.dispatch.dispatchutils.exe cute (dispatchutils. java: 106) at Org. apache. tools. ant. task. perform (task. java: 348) at org.apache.tools.ant.target.exe cute (target. java: 392) at Org. apache. tools. ant. target. performtasks (target. java: 413) at org.apache.tools.ant.project.exe cutesortedtargets (project. java: 1399) at org.apache.tools.ant.helper.singlecheckexecutor.exe cutetargets (singlecheckexecutor. java: 38) at org.apache.tools.ant.project.exe cutetargets (project. java: 1251) at org.apache.tools.ant.taskdefs.ant.exe cute (Ant. java: 442) at org.apache.tools.ant.taskdefs.calltarget.exe cute (calltarget. java: 105) at org.apache.tools.ant.unknownelement.exe cute (unknownelement. java: 291) at Sun. reflect. nativemethodaccessorimpl. invoke0 (native method) at Sun. reflect. nativemethodaccessorimpl. invoke (nativemethodaccessorimpl. java: 39) at Sun. reflect. delegatingmethodaccessorimpl. invoke (delegatingmethodaccessorimpl. java: 25) at java. lang. reflect. method. invoke (method. java: 597) at org.apache.tools.ant.dispatch.dispatchutils.exe cute (dispatchutils. java: 106) at Org. apache. tools. ant. task. perform (task. java: 348) at org.apache.tools.ant.target.exe cute (target. java: 392) at Org. apache. tools. ant. target. performtasks (target. java: 413) at org.apache.tools.ant.project.exe cutesortedtargets (project. java: 1399) at org.apache.tools.ant.project.exe cutetarget (project. java: 1368) at org.apache.tools.ant.helper.defaultexecutor.exe cutetargets (defaultexecutor. java: 41) at org.apache.tools.ant.project.exe cutetargets (project. java: 1251) at Org. apache. tools. ant. main. runbuild (main. java: 811) at Org. apache. tools. ant. main. startant (main. java: 217) at Org. apache. tools. ant. launch. launcher. run (launcher. java: 280) at Org. apache. tools. ant. launch. launcher. main (launcher. java: 109) Total time: 25 seconds
At first thought it was encoding problem, after query, found that the server side encoding and client encoding are UTF-8 encoding, so the encoding is no problem;
Run the show character set; command to find that the maximum UTF-8 encoding length is 3, which does not seem to affect the storage of all data, but it is suspected that the length of the field is limited, set the doccontent field type to longtext from text to solve the problem.
The length supported by text, mediumtext, and longtext is as follows (from MySQL 5.1 manual ):
Tinytext
The maximum length of a text column is 255 (28-1) characters.
Text [(M)]
A text column with a maximum length of 65,535 (216-1) characters.
Optional LengthM. MySQL creates the smallest column but is sufficient to accommodateMThe text type of the character length value.
Mediumtext
A text column with a maximum length of 16,777,215 (224-1) characters.
Longtext
A text column with a maximum length of 4,294,967,295 or 4 GB (232-1) characters. Maximum Value of the longtext ColumnValidThe length (allowed) depends on the maximum size of the package configured in the Client/Server protocol and the available memory.