Solved

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

Posted on 2001-06-18
5
608 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can anyone please tell me why i can not find ID  investorCoolGrid inside the jsp page? 1 23
going to wrong jsp page 2 46
How to log java errors in tomcat 8 24
Java array 21 78
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

713 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