Recently, a number of new features have been added to the university's project based on the STRUTS2 Open source framework, which uses MySQL. After writing the background of the new function code, unit testing also passed, to integrate the foreground, but when the use of JSP page operation, did not expect the report abnormal. As follows:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/2B/C6/wKioL1OK6P-SUzf9AALPsmTK7Kg296.jpg "title=" Sqlexception246.png "alt=" Wkiol1ok6p-suzf9aalpsmtk7kg296.jpg "/>
Java.sql.SQLException:Unknown type ' 246 in column 2 of 4 in binary-encoded result set.
Wondering why it's possible to pass JUnit?
After several searches, said is the MySQL bug, replaced the MySQL new version of the driver package, such as Mysql-connector-java-3.1.13-bin.jar, Mysql-connector-java-5.1.6-bin.jar, abnormal disappearance. Because of the time problem, this solution.
Reported exception MySQL driver package version:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/2B/C6/wKioL1OK6tPQDyM0AAHDS5tK1G4579.jpg "title=" Mysql-drive-version.png "alt=" Wkiol1ok6tpqdym0aahds5tk1g4579.jpg "/>
Note: There are also bugs in hibernate using MySQL.
Introspection: 1. Background code JUnit Why can pass, why JSP page to call not? Further research is needed.
This article is from the It Traveler blog, so be sure to keep this source http://fylxopensource.blog.51cto.com/1328715/1420964