Exception underlying input stream returned zero bytes Solution
System Environment
Jdk1.4
SQL Server 2000SP3 version
JDBC driver MS
During this time, I have been working on an ERP system, and this problem has always plagued me. There is a field data type in the database table that is text. When I read data from the database, this error always occurs on JSP pages. [Microsoft] [sqlserver 2000 driver for JDBC] underlying input stream returned zero bytes exception. From the information collected on the Internet, this is a JDBC bug,A "null" value and an "" (empty) cannot be stored in text fields.. This error always occurs when I read data from the database.
In desperation, I had to ask Google for help. The specific method is as follows:
[Solution: You can set the default value of a field in the table structure to "" (one char)]
But after I changed it, the error still persists. In desperation, there is no way to upgrade the database to SP4 and use sql2005 for JDBC. But the problem still exists. It is depressing.
This problem was not solved for several days. After I changed the text field to ntext, the miracle came into being. the error is missing. no need to express your joy. I hope Microsoft can solve this problem earlier. I have lost my temper due to this bug. Fortunately, it has been solved now.