Re: SocketException using servlets

Your servlet is probably not thread safe, the most simle thing to do is to
extends SingleThreadModel, then only one user will access your servlet at
a time. If you don't want that, try to put some synchronized in your code.

Regards, Benoit.

Walter do Valle wrote:

> Hello all!
>
> I'm needing some help. I use JigSaw 2.0.4 to serve some pages that use
> servlets to search and retrieve data from a DB2 database. The servlet
> receive data from a form, intercept it, mount a SQL statement and then
> gives the output to browser. But, if more then one user try to consult
> at the same time, JigSaw generates a SocketException like described
> below at the end of the e-mail.
>
> Other strange situation occurs when 2 users (for example) try to make a
> consult at the same time. In the browser of the user A appears nothing
> ("Document contains no data"). In the browser of the user B appears data
> about the consult of the user A. (I'm not crazy!)
>
> I tried to change the configuration of JigSaw Socket Conection
> Properties using JigAdmin, but I don't know exactly what I need to
> change and what value I must put there.
>
> If you can help me, please send me an e-mail.
>
> Thank you very much!
>
> java.net.SocketException: Descriptor not a socket: JVM_recv in socket
> input stream read
>         at java.net.SocketInputStream.socketRead(Native Method)
>         at java.net.SocketInputStream.read(Compiled Code)
>         at java.net.SocketInputStream.read(Compiled Code)
>         at java.io.DataInputStream.readInt(Compiled Code)
>         at COM.ibm.db2.jdbc.net.DB2Request.receive(Compiled Code)
>         at COM.ibm.db2.jdbc.net.DB2Request.sendAndRecv(Compiled Code)
>         at COM.ibm.db2.jdbc.net.DB2Statement.execute2(Compiled Code)
>         at COM.ibm.db2.jdbc.net.DB2Statement.executeQuery(Compiled Code)
>         at spPrincipal.Pessoa(Compiled Code)
>         at spPrincipal.spMain(spPrincipal.java:591)
>         at TeleSaj.spConsulta.doGet(spConsulta.java:75)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:715)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
>         at
> org.w3c.jigsaw.servlet.ServletWrapper.service(ServletWrapper.java:278)
>         at
> org.w3c.jigsaw.servlet.ServletWrapperFrame.perform(ServletWrapperFrame.java:118)
>         at org.w3c.tools.resources.FramedResource.performFrames(Compiled
> Code)
>         at org.w3c.tools.resources.FramedResource.perform(Compiled Code)
>         at org.w3c.jigsaw.http.httpd.perform(Compiled Code)
>         at org.w3c.jigsaw.http.Client.processRequest(Compiled Code)
>         at org.w3c.jigsaw.http.Client.startConnection(Compiled Code)
>         at org.w3c.jigsaw.http.socket.SocketClient.run(Compiled Code)
>         at org.w3c.util.CachedThread.run(Compiled Code)

--
- Benoît Mahé -------------------------------------------------------
                      World Wide Web Consortium   (W3C)
                    Architecture domain - Jigsaw Engineer

                http://www.w3.org/People/Mahe  - bmahe@w3.org
---------------------------------------------------------------------

Received on Friday, 25 February 2000 07:58:18 UTC