Solved

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

Posted on 2001-06-18
5
607 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
ID: 6202719
Hi,
  Can you post the code?
0
 

Author Comment

by:IVKRAJU
ID: 6207129
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
ID: 6209366
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
ID: 9010001
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

856 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