Solved

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

Posted on 2001-06-18
5
609 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Title # Comments Views Activity
hashmap order 17 63
Need help aligning JRadioButton that put in a box using GridBagLayout 2 42
How to log java errors in tomcat 8 39
netbeans can not run self signed app 8 38
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…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

752 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