Socket bug ?

I've programmed a http-chat-server in java and sometimes it hangs itself up when writing to a socket. I checked with jdb:
(JDK 1.4.0_01 on linux)
thread x
where[1] java.net.SocketOutputStream.socketWrite0 (native method)
[2] java.net.SocketOutputStream.socketWrite (SocketOutputStream.java:92)
[3] java.net.SocketOutputStream.write (SocketOutputStream.java:126)
[4] java.io.PrintStream.write (PrintStream.java:258)
[5] sun.nio.cs.StreamEncoder$CharsetSE.writeBytes (StreamEncoder.java:334)
[6] sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer (StreamEncoder.java:403)
[7] sun.nio.cs.StreamEncoder.flushBuffer (StreamEncoder.java:113)
[8] java.io.OutputStreamWriter.flushBuffer (OutputStreamWriter.java:169)
[9] java.io.PrintStream.write (PrintStream.java:305)
[10] java.io.PrintStream.print (PrintStream.java:448)
[11] gogi.yace.User.send (User.java:130)
[12] gogi.yace.Core.userSay (Core.java:697)
[13] gogi.yace.Core.execute (Core.java:53)
[14] gogi.yace.Room.saywithig (Room.java:87)
[15] gogi.yace.Core.roomSayIg (Core.java:660)
[16] gogi.yace.Core.execute (Core.java:51)
[17] gogi.yace.InputParser.evaluate (InputParser.java:172)
[18] gogi.yace.YaCE.gotInput (YaCE.java:143)
[19] gogi.yace.InputSck.run_sub (InputSck.java:139)
[20] gogi.yace.InputSck.run (InputSck.java:89)
It just doesn't return from socketWrite0, and no execption is thrown and nothing happens even if i wait for hours!
It usually happens once a day (then i have to restart the server) and i have no idea why.
Is this a socket bug? Do you know what i could do?
Thanks
GoGi

You say it will hang if on the other end no one reads
from it?
Well is there any way to check that?Not really
And what happens to the threads when i use separate
threads for sending? They will never end and in a few
days i have 100 running threads which are all hangingagain, not really, because you can set a timeout in another thread, and if it wakes up and the message hasn't been sent, you close the socket, which should wake your other threads up

Similar Messages

  • ANOTHER Java NIO Socket Bug??

    I think I'm being really dense here but for the life of me, I can't get this code to work properly. I am trying to build a NIO socket server using JDK 1.4.1-b21. I know about how the selector OP_WRITE functionality has changed and that isn't my problem. My problem is that when I run this code:
    if (key.isAcceptable()) {
         System.out.println("accept at " + System.currentTimeMillis());
         socket = server.accept();
         socket.configureBlocking(false);
         socket.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRITE);
    if (key.isWritable()) {
         SocketChannel client = (SocketChannel)key.channel();
         System.out.println("write at " + System.currentTimeMillis());
    if (key.isReadable()) {
         SocketChannel client = (SocketChannel)key.channel();
         readBuffer.clear();
         client.read(readBuffer);
         System.out.println("read at " + System.currentTimeMillis());
    }the isWritable if statement will always return (which is fine) and the isReadable if statement will NEVER return (which is most certainly NOT FINE!!). The readBuffer code is there just to clear out the read buffer so isReadable is only called once per data sent.
    This SEEMS to be a bug in how the selector works? I would expect to see isReadable return true whenever data is sent, but that is not the case. Now here is the real kicker ;) Go ahead and change this line:
    socket.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRITE);to this:socket.register(selector, SelectionKey.OP_READ);And now it appears that isReadable is running as expected?! To let people run this code on their own, I have uploaded a copy of the entire java file here:
    http://www.electrotank.com/lab/personal/mike/NioTest.java
    Please forgive the code, it's just the smallest test harness I could make and much of it is lifted from other posts on this forum. You can test this by using Telnet and connecting to 127.0.0.1:8080. You can test the isReadable piece by just typing in the Telnet window.
    Someone else has listed something as a bug in the Bug Parade, but the test case is flawed:
    http://developer.java.sun.com/developer/bugParade/bugs/4755720.html
    If this does prove to be a bug, has someone listed this already? Is there a nice clean workaround? I'm getting really desperate here. This bug makes the NIO socket stuff pretty unusable. Thanks in advance for the help!!
    Mike Grundvig
    [email protected]
    Electrotank, Inc.

    Yeah, isReadable crashed for me too.
    My solution was to not call it. I set up two selectors for the two operations I wanted notifying (accept and read) and used them independently in different threads. The accept thread passes them over to the read thread when they're accepted.
    This way I don't need to call isReadable since it is bound to be readable otherwise it wouldn't have returned, as read is the only operation I'm being notified about.
    --sam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • XML Socket bug or FL 2.1 WM5 limitation?

    The following defect (?) was detected when socket is trying
    to connect with any IP except 'NULL' or '127.0.0.1'. The error
    message is 'Alert. Error:ActionScript Stuck'. Test device -
    Qtek-8300. Emulator FL 2.1 and BREW devices handle connect error
    event correctly.
    Script example is in attach.
    Alex

    Hi,
    we havent encountered this in our in-house testing. We will
    recheck on the
    same device and get back to you.
    Regards,
    Vijayan.
    "netsoul" <[email protected]> wrote in
    message
    news:eh9u41$cgj$[email protected]..
    > The following defect (?) was detected when socket is
    trying to connect
    > with any
    > IP except 'NULL' or '127.0.0.1'. The error message is
    'Alert.
    > Error:ActionScript Stuck'. Test device - Qtek-8300.
    Emulator FL 2.1 and
    > BREW
    > devices handle connect error event correctly.
    >
    > Script example is in attach.
    >
    > Alex
    >
    >
    > var url:String = '127.0.0.2';
    > // var url:String = '127.0.0.1';
    > // var url:String = null;
    > var socket:XMLSocket = new XMLSocket()
    > socket.onConnect = function (success:Boolean) {
    > if (success) {
    > trace ("Connection succeeded!");
    > } else {
    > trace ("Connection failed!");
    > }
    > }
    > if (!socket.connect(url, 2000)) {
    > trace ("Connection failed!");
    > }
    >

  • Weird socket bug, 'Error #2031: Socket Error'

    I'm putting together an application which opens a connection
    to a server, sends a chunk of binary data and then closes the
    connection. When I run the application without handing
    IOEventError, I get the socket error message below but the data
    sends. When I handle IOEventError, I get the same message passed to
    the handler but no data is sent. When I capture TCP data during the
    connection, you can that without the handler a '[PSH, ACK]' packet
    of length 29 (my data) is sent out. With the handler, a '[FIN]'
    packet is sent instead. I've pasted the errors, code and TCP
    traffic below.
    Has anyone else encountered this socket weirdness? How do I
    figure out what this error message means?
    Thanks for the help!
    -J. Flier
    Error message to the console with no handler (but data
    sends): "Error #2044: Unhandled IOErrorEvent:. text=Error #2031:
    Socket Error.
    at handleSendPacketClick()[src\Test.mxml:156]
    at Test_Button2_click()[\src\Test.mxml:333]"
    Error message to the handler (no data sends): "IOErrorEvent
    type="ioError" bubbles=false cancelable=false eventPhase=2
    text="Error #2031: Socket Error. URL: 192.168.220.128"
    errorID=2031"
    TCP traffic with no handler:
    1 0.000000 192.168.220.1 192.168.220.128 TCP timelot > cbt
    [SYN] Seq=0 Win=65535 Len=0 MSS=1460
    2 0.000484 192.168.220.128 192.168.220.1 TCP cbt > timelot
    [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460
    3 0.000542 192.168.220.1 192.168.220.128 TCP timelot > cbt
    [ACK] Seq=1 Ack=1 Win=65535 Len=0
    4 0.005418 192.168.220.1 192.168.220.128 TCP timelot > cbt
    [PSH, ACK] Seq=1 Ack=1 Win=65535 Len=29
    5 0.005615 192.168.220.128 192.168.220.1 TCP cbt > timelot
    [ACK] Seq=1 Ack=30 Win=5840 Len=0
    6 2.410136 192.168.220.1 192.168.220.128 TCP timelot > cbt
    [FIN, ACK] Seq=30 Ack=1 Win=65535 Len=0
    7 2.450241 192.168.220.128 192.168.220.1 TCP cbt > timelot
    [ACK] Seq=1 Ack=31 Win=5840 Len=0
    8 2.486507 192.168.220.128 192.168.220.1 TCP cbt > timelot
    [FIN, ACK] Seq=1 Ack=31 Win=5840 Len=0
    9 2.486563 192.168.220.1 192.168.220.128 TCP timelot > cbt
    [ACK] Seq=31 Ack=2 Win=65535 Len=0
    TCP traffic with handler:
    17 438.448287 192.168.220.1 192.168.220.128 TCP dvt-data >
    cbt [SYN] Seq=0 Win=65535 Len=0 MSS=1460
    18 438.448629 192.168.220.128 192.168.220.1 TCP cbt >
    dvt-data [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460
    19 438.448683 192.168.220.1 192.168.220.128 TCP dvt-data >
    cbt [ACK] Seq=1 Ack=1 Win=65535 Len=0
    20 438.449489 192.168.220.1 192.168.220.128 TCP dvt-data >
    cbt [FIN, ACK] Seq=1 Ack=1 Win=65535 Len=0
    21 438.451503 192.168.220.128 192.168.220.1 TCP cbt >
    dvt-data [ACK] Seq=1 Ack=2 Win=5840 Len=0
    22 438.452759 192.168.220.128 192.168.220.1 TCP cbt >
    dvt-data [FIN, ACK] Seq=1 Ack=2 Win=5840 Len=0
    23 438.452793 192.168.220.1 192.168.220.128 TCP dvt-data >
    cbt [ACK] Seq=2 Ack=2 Win=65535 Len=0
    var socket:Socket=new Socket();
    // First we generate our packet
    msg=generateMessage();
    // Then we open a connection
    //socket.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
    socket.connect(backendIPTextInput.text, int(textInput.text));
    // Finally we send the packet
    socket.writeBytes(msg);
    socket.flush();
    socket.close();

    Having spent three days trying to run this down, I'm going to start by saying that I'm honestly surprised no ones put together a page that says, "Oh hey, before you use XML sockets here's 150 things you need to know first."  Or maybe someone did put that page together but I couldn't find it.  So in the interest of saving someone the big hassle I just had, here's what you might be doing wrong.
    Start here:
    http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dic tionary860.html
    Then have a look at this, particularly the example:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/XMLSocket.html
    Now you might be tempted to skip all of the adding of those event listeners, but if you do if any kind of communication problem arises in the connection Flash won't know how to handle it and you'll get Error #2031 or #2044 or both.
    But wait, that's not all!  You also have to come up with some way to let the PLAYER (not your application, not the sever) know that it's allowed to communicate on the port, and for that you need this document:
    http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html
    Seriously, if this helps you, please let me and Adobe know.

  • Sockets problem under 1.4

    After upgrading to version 1.4 of the Java runtime, several of our users experience the following problem. Some of the data sent from the server seems to disappear from the socket. If I snoop on the machine, I can see the data coming in, but if I dump the raw bytes directly from the socket to a file, the data is not there. I appreciate any help. Thanks.
    -Pete Spiro

    I think I read somewhere that there are Socket bugs in 1.4. You should check out the bug list to see if I'm right or not, and if it pertains to your problem.

  • Socket errors w/ JRockit?

    We haven't isolated the problem to JRockit yet, but I'm wondering if there have
    been any reports of unusual numbers of Socket errors w/ JRockit. We're getting
    an unusually high number of "Socket closed" exceptions, both from Tomcat and our
    own java.net.Socket using code.
    Thanks,
    Nick Wesselman
    Digital Visions, Inc.

    Dave,
    Thanks! 8.0 solved our problems. Though I thought I'd inform you that running
    Tomcat 4.1.18 w/ a heap of 256MB, we found that using gencopy GC would result
    in the app becoming totally unresponsive after about 15 minutes. Though our heap
    size isn't very big, we went to gencon GC and didn't experience the same behavior.
    (though I'll also say that even 7.0 was much more stable than any standard JDK
    we've tried... move over Sun!)
    Nick Wesselman
    Digital Visions, Inc.
    David Simms <[email protected]> wrote:
    Hi Nick,
    I do believe we have fixed a socket bug or two in the new version
    (JRockit 8.0), check out
    http://www.bea.com/products/weblogic/jrockit/index.shtml .

  • Decompile applet and proxify all URL and socket connection and recompile

    Hi,
    Please anybody have idea for the below.
    I need to decomple the applet class file to .java file and need to change all URL and Socket connection to proxify all connections from applet. and recompile the sample applet to make ready to load in browser.
    Thi is to load the applet form the web server through one proxy server. In the proxy server side While loading the applet from web server that applet code need to be changed to modify the URL and connections used in that applet to change the further connection from applet through proxyserver.
    Compile and decompile is not a problem that i can use javac and javap respectively.
    But I want to know how to change all URL and connection in applet. is there any easy way to handle this with out changing the applet code.
    can Anybody help me.
    Thanks and Regards,
    Shiban.

    Not sure how you do that:
    Client <----[HTTPS]-----> Secure Gateway <------[HTTP]------->Web servers
    or
    Internet Explorer/Mozilla <----[HTTPS]-----> proxy <------[HTTP]-------> Google
    Is the above correct?
    If so than what are the proxy settings in IE/Moz, I can specify the proxy address in the
    browsers but not the proxy type (SSL).
    When you want to visit a page like google I gues you just type http://www.google.com in
    the browsers address bar. The browser will figure out how to connect to the proxy.
    Java has got the control panel in the general tabl there is a button "network settings...:"
    I have it to "use browser settings" and this works for me.
    All URL and URLConnections work but the sockets don't (maybe put in a bug report)
    for example games.yahoo.com -> card games -> bridge -> create table
    In the trace I can see:
    network: Connecting http://yog70.games.scd.yahoo.com/yog/y/b/us-t1.ldict with proxy=HTTP @ myproxy/00.00.00.00:80
    network: Connecting socket://yog70.games.scd.yahoo.com:11999 with proxy=DIRECT
    The second one fails because port 11999 is not open (what idiot uses an unassigned
    port for a profesional site is beyond me).
    http://www.iana.org/assignments/port-numbers
    #               11968-11999 Unassiged
    Even if the port was open on the proxy you'll notice with proxy=DIRECT that
    "use browser settings" does not work with socket (bug report??).
    Anyway my advice is to open the java console (windows control panel or javacpl.exe in
    the bin dir of java.home) and make sure it is set to "use browser settings"
    Then enable a full trace:
    To turn the full trace on (windows) you can start the java console, to be found here:
    C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
    In the advanced tab you can fill in something for runtime parameters fill in this:
    -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    if you cannot start the java console check here:
    C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    add or change the following line:
    javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    for 1.5:
    deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    The trace is here:
    C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    Print out the full trace of the exception:
    try{...}catch(Exception e){e.printStackTrace();}
    Then visit the games.yahoo and try to create a new table playing bridge.
    Inspect the trace and see if it works/why it doesn't work.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • "Hung" connections

    Hi.
    We are trying to determine why tcp based connections are consistently being hung on our Sun E450 with Solaris 8. We can watch the packets go back and forth with snoop on the server even when the connection is hung, but the specific service daemon doesn't seem to send back the right response to the workstation. The response seems to be zero bytes in size. This is happening within telnet, ftp, ssh.
    Is there a known kernel/ip interface/streams/socket bug that causes this problem?
    Thanks,
    Marty Schlafer
    [email protected]

    Interestingly the problem was caused by packet fragmentation over a VPN. Changing the MTU on the VPN ends to be large enough for the ip header, ipsec header, and the rest of the packet data solved the problem.

  • Run rwconverter without X-Display

    in Batch Compile Script for Forms and Reports there is a Note:
    If you dont want to use the X-Display then you can use f60gen,f90gen and frmcmp_batch.sh for compiling Forms. Make sure TERM, ORACLE_TERM and NLS_LANG values are properly set..
    does it know someone as to do it with rwconverter,? that If you dont want to use the X-Display.
    thanks for help

    user11384438 wrote:
    Hi,
    I am administering an older Sun Fire Sparc Server with Solaris 10 and Oracle 9 and 10 on it.
    I have to remove Oracle 10 now because we moved the databases to a linux server, but i can´t find a manual how to remove it without X server.
    The x-server on the sun does not work ( probably never has ), there´s no monitor ( i think we don´t have a sun monitor anywhere ).
    the admin who installed it probably has done so without graphic interface, so there should be a way to get rid of it as well without x.
    ( ssh _X gives me the Failed to allocate internet-domain X11 display socket bug and the usual solutions don´t work )
    ( I don´t want to reconfigure it or change oracle, i just want to get rid of it to free space for other things. so i can use rude methods as well. )find $ORACLE_HOME -exec rm -f {} \;

  • Socket Flush Bug in Windows (JRE1.4.2)

    It may be a bug or a OS (windows) specific issue.
    The problem is:
    You have a socket and an OutputStream (DataOutputStream or
    BufferedOutputStream).
    If you do two write/flush in a loop, the second write
    one will be stuck in the underlying socket buffer.
    And, no matter what you do, you cannot flush it. I tried everything,
    even getFD().sync(), but it did not work. (SyncFailedException)
    Then when you do another write/flush (the third one) the second one
    finally goes to the server. But now you have the third one stuck !!!
    I just found out that if you put a Thread.sleep(100) in between the
    write/flush, it works !!!! But that's scary.
    Another possible workaround is to avoid multiple writes, in other
    words, never do a write in a loop. If you need to send three byte
    arrays, put them all in a single byte array and send the whole thing
    at once, in a single write. Or use a BufferedOutputStream for that matter.

    Thank you for your reply !!!
    For my surprise, the problem is not with the flush !!!! I am 99% sure this is a bug. Some other people told me it does not happen with Linux.
    Look what I did:
    BufferedOutputStream bos = new BufferedOutputStream(socket.getOutputStream());
    for(int i=0;i<2;i++) bos.write(bytearray); // buffering here !!!!
    bos.flush(); // send the whole thing at once !!!!
    Guess what happened ? IT DID NOT WORK AGAIN !!!!
    The second bytearray got stuck in the socket buffer.
    Now if you do this:
    for(int i=0;i<2;i++) {
    bos.write(bytearray); // buffering here !!!!
    Thread.yield();
    bos.flush(); // send the whole thing at once !!!!
    It works !!! This is very strange.
    EJP, I agree with you, but the situation I am describing should never happen. I must be able to tell the socket to send its contents NOW. It cannot hold its bytes forever, until something else comes along in the stream. Agree ?
    Whenever I have time I will write a test case to isolate the problem.
    Sergio

  • Test Stand Sequence Example - OverrideSe​rialNumFor​ParallelMo​del.Seq Bug with Socket Index Report?

    Hello -  is there a way to have the testand sequence  "OverrideSerialNumForParallelModel.Seq"   give the reports correctly with the "Test Socket Index"  Correctly at 0,1,2,3 instead of each window haveing 0,0,0,0
    I've spent a long time trying to get it to work  with my applciation -but can't seem to find the answer.
    OverrideSerialNumForParallelModel  can be found at: 
    \\Examples\ProcessModels\ParallelModel
    Many Thanks 
    brad
    Brad Whaley
    LabVIEW Certified Engineer
    Attachments:
    parallel-bug-testsand-report-index.jpg ‏156 KB

    Hi Brad,
    The reason that all of the report view tabs are displaying the same socket ID is that you are currently generating a single report file for all of your test sockets (the default behavior), and this same report file is being displayed for all of the sockets.  You will notice that if you scroll down in any of the reports, results for all of the other sockets will be present.  If you would prefer to have a separate report file for each test socket, you can enable the New UUT Report File for Each Test Socket report options as shown below.  
    Let me know if this does not fix the problem for you!
    Al B.
    Staff Software Engineer - TestStand
    CTA/CLD

  • L when doing a master reset on iPhone.  Have tried turning off/on with no luck.  Safe reboot displays many bugs and socket is not launched.....

    Yesterday while attempting to perform a master reset on my iPhone 5, I was instructed to log onto iTunes, plug my phone in and "follow" the instructions.  After connecting my phone to my Mac book pro (bought a year and a half ago), the laptop recognized my phone and immediately after that, the apple icon and spinning wheel appeared.  Not realizing that it was not part of the download process, I waited a couple of hours to no avail.  I was informed by the person working at the phone store that the update could take 'awhile'.....I have tried turning on and off several times, and the screen remains grey with the apple icon and spinning wheel.  Just performed a safe boot using the shift - command - v key and the screen shows a long list of Bug: launchctl with a message at the bottom "socket is not connected".  Any suggestions would be appreciated.

    I would like to point out the fact that I mentioned my phone is iPhone 4, iOS 7.1.2
    I don't care if it is a known defect in iOS 8, my phone is not iOS 8 and can not be updated past 7.1.2
    Your solution will not work because I can't see the group message in the first place, deleting it would not be possible.
    Also, I can not wait for the update on a phone that can no longer update.

  • Couldn't read from socket error: Is this a bug in Java?

    I have been facing this grave problem for a long time now. After establishing a socket connection with some server:port say 207.123.17.20:1865, I get this error "Couldn't read from socket" as an IOException. I can neither read or send any packets to the server after receiving this error. On checking whether the socket connection is alive or not, I print socket.getAddress() and it returns me the ip of the server to which it is connected. The specification says that receiving this error means the socket was closed by the server. If it so then how I am able to print the server address after receiving this error? How can I get around this problem? Plz. help...

    watertownjordan said:
    If your computer (client) killed the connection, it should throw an error >pointing to the OS closing the connection. but what if my client app cntrl alt del while the server is waiting to here from the client.
    my client may sit idle for hours and then contact again. i want to keep their socket connected but if they cntrl alt del then i want to close the socket so the thread on the server side can be exited.
    the way i solved this was to send an "i'm still here" message to the serv in a timer every 10 seconds and set the time out on the server side to 30 seconds.
    i used a syncronized boolean variable like so:
        volatile private boolean out1busy = false;
        private synchronized boolean getOut1busy(){
         return out1busy;
        private synchronized void setOut1busy(boolean on){
         out1busy = on;
        }then in the timer i do this
            while (getOut1busy()) try { Thread.sleep(40); } catch (InterruptedException ex) {}
            setOut1busy(true);
            lobbyOut.println("-1");
            setOut1busy(false);it seems to work fine but the loop using the thread.sleep does not seem right and i know very little about this all.
    i'm basically asking the same thing as Chintan.Kanal
    Is there any way I can test whether the socket connection is alive from the server side?
    does my approach above have flaws.
    again it seems to work but i am not very Java savy lol.

  • BUG ? : No more data to read from socket

    I have a problem while using the CURSOR function in a xsql:query with a where clause and an order by :
    Example :
    My xsql file :
    <xsql:query connection="demo" xmlns:xsql="urn:oracle-xsql">
    select d.deptno as deptno, d.dname,
    CURSOR( select empno,ename
    from emp
    where deptno = d.deptno) as emps
    from dept d
    where deptno < 40
    order by d.deptno desc
    </xsql:query>
    And my obtained result is :
    <xsql-error code="17410" action="xsql:query" xsql-timing="2025">
    <statement>select d.deptno as deptno, d.dname, CURSOR( select empno,ename from emp where deptno = d.deptno) as emps from dept d where deptno < 40 order by d.deptno desc</statement>
    <message>No more data to read from socket</message>
    </xsql-error>

    This problem still exists in OWB 11g R2. I hit this same issue yesterday. Not sure why its claimed to be resolved

  • Bug in socket.writeUTF ???

    I am writing a tcp/ip client. I am using socket .writeUTF to
    send the string to the server socket. However, there is a character
    being inserted in my utf string (that I am not putting there). I
    write the string to my display just before sending it, and the
    output doesn't match what I see in my sniffer going across to the
    server. Has anyone else seen this ?

    Actually I found that I was using the wrong method to write
    the data. Thanks for your response.

Maybe you are looking for