Com. mysql. jdbc. exceptions. jdbc4.MySQLSyntaxErrorException: Garbled characters occur when blob data is inserted,
Com. mysql. jdbc. exceptions. jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near u-Snapshot €? Ú«] qs \ 0 ¥n'c § n wb }?ú??h h =a Ž nC ç?w · g · =+ \', Ó óxè ² ° «² § w. l-<× jz | 'O' limit l limit Z ° limit comment 'at line 1
At sun. reflect. NativeConstructorAccessorImpl. newInstance0 (Native Method)
At sun. reflect. nativeconstruct%cessorimpl. newInstance (nativeconstruct%cessorimpl. java: 57)
At sun. reflect. delegatingconstruct%cessorimpl. newInstance (delegatingconstruct%cessorimpl. java: 45)
At java. lang. reflect. Constructor. newInstance (Constructor. java: 526)
At com. mysql. jdbc. Util. handleNewInstance (Util. java: 411)
At com. mysql. jdbc. Util. getInstance (Util. java: 386)
At com. mysql. jdbc. SQLError. createSQLException (SQLError. java: 1052)
At com. mysql. jdbc. MysqlIO. checkErrorPacket (MysqlIO. java: 3609)
At com. mysql. jdbc. MysqlIO. checkErrorPacket (MysqlIO. java: 3541)
At com. mysql. jdbc. MysqlIO. sendCommand (MysqlIO. java: 2002)
At com. mysql. jdbc. MysqlIO. sqlQueryDirect (MysqlIO. java: 2163)
At com.mysql.jdbc.ConnectionImpl.exe cSQL (ConnectionImpl. java: 2624)
At com.mysql.jdbc.PreparedStatement.exe cuteInternal (PreparedStatement. java: 2127)
At com.mysql.jdbc.PreparedStatement.exe cuteUpdate (PreparedStatement. java: 2427)
At com.mysql.jdbc.PreparedStatement.exe cuteUpdate (PreparedStatement. java: 2345)
At com.mysql.jdbc.PreparedStatement.exe cuteUpdate (PreparedStatement. java: 2330)
At com. silence. mysqlTest2.JDBCTest. testInsertBlob (JDBCTest. java: 95)
At sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method)
At sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 57)
At sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 43)
At java. lang. reflect. Method. invoke (Method. java: 606)
At org. junit. runners. model. FrameworkMethod $1. runReflectiveCall (FrameworkMethod. java: 47)
At org. junit. internal. runners. model. ReflectiveCallable. run (ReflectiveCallable. java: 12)
At org. junit. runners. model. FrameworkMethod. invokeExplosively (FrameworkMethod. java: 44)
At org. junit. internal. runners. statements. InvokeMethod. evaluate (InvokeMethod. java: 17)
At org. junit. runners. ParentRunner. runLeaf (ParentRunner. java: 271)
At org. junit. runners. BlockJUnit4ClassRunner. runChild (BlockJUnit4ClassRunner. java: 70)
At org. junit. runners. BlockJUnit4ClassRunner. runChild (BlockJUnit4ClassRunner. java: 50)
At org. junit. runners. ParentRunner $ 3.run( ParentRunner. java: 238)
At org. junit. runners. ParentRunner $1. schedule (ParentRunner. java: 63)
At org. junit. runners. ParentRunner. runChildren (ParentRunner. java: 236)
At org. junit. runners. ParentRunner. access $000 (ParentRunner. java: 53)
At org. junit. runners. ParentRunner $2. evaluate (ParentRunner. java: 229)
At org. junit. runners. ParentRunner. run (ParentRunner. java: 309)
At org. eclipse. jdt. internal. junit4.runner. JUnit4TestReference. run (JUnit4TestReference. java: 50)
At org. eclipse. jdt. internal. junit. runner. TestExecution. run (TestExecution. java: 38)
At org. eclipse. jdt. internal. junit. runner. RemoteTestRunner. runTests (RemoteTestRunner. java: 467)
At org. eclipse. jdt. internal. junit. runner. RemoteTestRunner. runTests (RemoteTestRunner. java: 683)
At org. eclipse. jdt. internal. junit. runner. RemoteTestRunner. run (RemoteTestRunner. java: 390)
At org. eclipse. jdt. internal. junit. runner. RemoteTestRunner. main (RemoteTestRunner. java: 197)
Obviously, garbled characters are displayed. Check the encoding set gbk of the mysql system. This is obviously different from that of the myeclipse project in UTF-8 encoding. Then, change the mysql gbk to utf8, you can.