Solved

java.net.SocketException: socket write error (code=10053)

Posted on 2001-06-18
5
603 Views
Last Modified: 2008-02-01
Hi All,

I got socketexception and here I am sending entire error message.it is urgent so I would be appreciated if any one can help me.

starting com.peco.montage.servlet.GetLookupObjectsServlet Servlet...
java.net.SocketException: socket write error (code=10053)
      java.lang.Throwable(java.lang.String)
      java.lang.Exception(java.lang.String)
      java.io.IOException(java.lang.String)
      java.net.SocketException(java.lang.String)
      void java.net.SocketOutputStream.socketWrite(byte [], int, int, java.io.FileDescriptor)
      void java.net.SocketOutputStream.write(byte [], int, int)
      void com.ibm.servlet.engine.http_transport.HttpTransportConnection.write(byte [], int, int)
      void com.ibm.servlet.engine.srp.SRPConnection.write(byte [], int, int)
      void com.ibm.servlet.engine.srt.SRTOutputStream.write(byte [], int, int)
      void com.ibm.servlet.engine.webapp.BufferedServletOutputStream.writeOut(byte [], int, int)
      void com.ibm.servlet.engine.webapp.BufferedServletOutputStream.flushBytes()
      void com.ibm.servlet.engine.webapp.BufferedServletOutputStream.write(byte [], int, int)
      void java.io.ObjectOutputStream.drain()
      boolean java.io.ObjectOutputStream.setBlockData(boolean)
      void java.io.ObjectOutputStream.writeObject(java.lang.Object)
      void com.peco.montage.servlet.GetLookupObjectsServlet.writeObjects(java.io.ObjectOutputStream, java.lang.Object)
      void com.peco.montage.servlet.MontageServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
      void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
      void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
      void com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
      void com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
      void com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engine.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest, javax.servlet.ServletResponse)
      void com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
      void com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
      void com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.servlet.engine.webapp.ServletInstanceReference, javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
      void com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
      void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(com.ibm.servlet.engine.webapp.WebAppRequest, com.ibm.servlet.engine.webapp.WebAppResponse, boolean)
      void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, boolean)
      void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
      void com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(java.lang.Object)
      void com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(java.lang.Object)
      void com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(java.lang.String, com.ibm.servlet.engine.srp.ISRPConnection)
      void com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(com.ibm.servlet.engine.oselistener.api.IOSEConnection)
      void com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection(java.net.Socket)
      void com.ibm.servlet.engine.http_transport.HttpTransportHandler.run()
      void java.lang.Thread.run()

starting com.peco.montage.servlet.LoginServlet Servlet...
0
Comment
Question by:IVKRAJU
  • 2
5 Comments
 
LVL 1

Expert Comment

by:tonus
Comment Utility
Hi,
  Can you post the code?
0
 

Author Comment

by:IVKRAJU
Comment Utility
here I am sending the servlet code

public class GetLookupObjectsServlet extends MontageServlet {
/**
 * GetLookupObjects constructor comment.
 */
public GetLookupObjectsServlet() {
     super();
}
/**
 * Reads any objects sent by the UI.
 * Creation date: (5/8/01 5:24:42 PM)
 */
protected Object readAndExecute(java.io.ObjectInputStream in, com.peco.montage.util.ApplicationCommunicationToken act, com.peco.montage.servlet.util.ServletCommunicationToken sct) throws javax.servlet.ServletException, java.io.IOException, ClassNotFoundException {
     // Get the list of tables to select from the big hashmap    
     String tableNames[] = (String[]) in.readObject();

     // Pull the full set of lookups from the servlet context
     HashMap full = (HashMap) getServletContext().getAttribute(LookupObjects.LOOKUP_OBJECT_NAME);
     LookupFinder lookup = new LookupFinder(full);

     // Create a new one with just the values we need to pass back
     HashMap partial = new HashMap();

     // Look up the table names one by one, pulling their hashmaps and adding them to
     // the list to be returned
     for (int i=0; i<tableNames.length; i++) {
          HashMap one = lookup.getData(tableNames[i]);
          partial.put(tableNames[i], one);
     }


     
     // Retrieve the Meter Action Data (MTAC)
     LookupMTAC lookupMtac = (LookupMTAC)getServletContext().getAttribute(LookupObjects.LOOKUP_MTAC);

     
     // Retrieve the categories
     HashMap lookupCat = (HashMap)getServletContext().getAttribute(LookupObjects.LOOKUP_CATEGORIES);

         
     // Retrieve the categories
     HashMap lookupJobCat = (HashMap)getServletContext().getAttribute(LookupObjects.LOOKUP_JOB_CATEGORIES);
     ArrayList lookupJobCatArray = (ArrayList)getServletContext().getAttribute(LookupObjects.LOOKUP_JOB_CAT_ARRAY);

     sct.setSuccessfulAction(true);    

     
     Object[] objsToReturn =     {partial, lookupMtac, lookupCat, lookupJobCat, lookupJobCatArray};

     return objsToReturn;
}
/**
 * Writes the objects back to the UI.
 * Creation date: (5/8/01 5:24:42 PM)
 */
protected void writeObjects(java.io.ObjectOutputStream out, Object objsToWrite) throws javax.servlet.ServletException, java.io.IOException {
     Object[] objarray = (Object[]) objsToWrite;

     for (int i=0; i<objarray.length; i++) {
          out.writeObject(objarray[i]);
     }
}
}

0
 
LVL 1

Accepted Solution

by:
tonus earned 100 total points
Comment Utility
In the wirteObjects method, you can write the entire object array to the ouput stream at one short.

ie.,
    Object[] objarray = (Object[]) objsToWrite;
    out.writeObject(objarray);
---------------------------
In the client side you read the object and type cast to Object[].      

0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


[points to tonus]


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now