Exception at socketWrite0 on writing to socket
When the UI of our application writes a huge data to socket, an exception is thrown. The Java thread for the same is as shown below:
at java.net.SocketOutputStream.socketWrite0(Native Method)
On searching the internet, I have come across several of the similar types of errors
reported by various people having the same type of stack trace. Nowhere it is
mentioned clearly what solution they have appied to fix the issue.
On investigation of jre 1.5 package, I found out that the culprit function
socketWrite0 has been declared in SocketOutputStream.java.
The class SocketOutputStream.class is part of rt.jar under the directory java\net
in the jre package.
In SocketOutputStream.java, the function socketWrite0 has been declared as native
method. It's implementation has been done in the C++ as
Java_java_net_SocketOutputStream_socketWrite0 function and it is part of net.dll
provided with jre package.
In the case when the UI of our application writes only a small data to socket, no exception is thrown and it works fine.
My queries are as following:
1) How the function socketWrite0 has been implemented. What is the API method/system call that is writing to socket.
2) What is the reason of exception. If the huge size of the data is the reason, what is the limiting size?
3) What is the probable solution/workaround for this issue, if any.
Thanks and Regards
Last Post: 03-18-2005, 08:57 AM
Last Post: 06-25-2002, 11:42 AM
By David Williams in forum .NET
Last Post: 05-28-2002, 02:19 PM
Last Post: 12-26-2001, 04:48 AM
By Aliasgar in forum Java
Last Post: 04-17-2001, 07:25 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL