DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006

    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)
    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
    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, 08:57 AM
  2. writing bytes onto socket ??
    By satish in forum Java
    Replies: 0
    Last Post: 06-25-2002, 11:42 AM
  3. Exception Handling in Exception Handlers
    By David Williams in forum .NET
    Replies: 1
    Last Post: 05-28-2002, 02:19 PM
  4. Replies: 0
    Last Post: 12-26-2001, 04:48 AM
  5. Socket Code
    By Aliasgar in forum Java
    Replies: 0
    Last Post: 04-17-2001, 07: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
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

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

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.