Exception at socketWrite0 on writing to socket


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Exception at socketWrite0 on writing to socket

  1. #1
    Join Date
    Jan 2006
    Posts
    1

    Exception at socketWrite0 on writing to socket

    Hi,

    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)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)


    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
    Anil Pradhan

  2. #2
    Join Date
    Jan 2006
    Posts
    53
    What is the name of the exception that is being thrown?

Similar Threads

  1. socket exception problem
    By sanu in forum Java
    Replies: 0
    Last Post: 03-18-2005, 09:57 AM
  2. writing bytes onto socket ??
    By satish in forum Java
    Replies: 0
    Last Post: 06-25-2002, 12:42 PM
  3. Exception Handling in Exception Handlers
    By David Williams in forum .NET
    Replies: 1
    Last Post: 05-28-2002, 03:19 PM
  4. Replies: 0
    Last Post: 12-26-2001, 05:48 AM
  5. Socket Code
    By Aliasgar in forum Java
    Replies: 0
    Last Post: 04-17-2001, 08:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center