COMM outputstream blocking forever

I am writing an application that talks with a modem through an RS232 serial port using the COMM packet on Windows.
The problem is how to detect when the modem is not there for some reason. I discovered that the outputStream.write(...) function blocks forever. Is there a way to make it non-blocking, giving me a chance to do something else if no device is listening to the serial port?
System.out.println("Writing to device");
outputStream.write("AT".getBytes()); //  <- program hangs here if no device is present
outputStream.write((byte) 0x0D);
System.out.println("Done");
//Then try to read AT....OK to see if modem is responding

You should be able to check for the presence/absence of a modem by chacking the state of the incoming signals
e.g. DSR=data set ready should be asserted if the modem is ready.
You may find this link helpful
http://www.camiresearch.com/Data_Com_Basics/RS232_standard.html

Similar Messages

  • How to commit ONE block only...

    Hi Guys,
    I have 2 database blocks in my form. In one block user can select and enter fields from a LOV. And in other record he can enter new records and save. This is the most common senerio of my form.
    But in some case he can enter new record in the first block and can enter new records in the second block.
    The problem i am facing is that if user select an existing record from a LOV and then on the basis of these values he enter an other record in the second block.. COMMIT_FORM also tries to save the record in the first block and as the record already exists it gives error "unbale to insert record" i want to commit only the second block but in some cases i have to commit both blocks.
    Kindly suggest me what to do please.
    Imran Baig

    If u want to commit one block only for a particular condition then
    create an on-insert trigger at the block :
    If your condition is met then
    INSERT_RECORD;
    ELSE
    NULL;
    END IF;
    similary you can code on-update,on-delete triggers as per your requirement

  • Login window blocks forever

    I have done a systemupgrade. Unfortunately during the upgrade my laptop shutdown (due to high temperature).
    I let the laptop cool down and tried to login again, but I just could enter my login name and the password and then the login widow blocked forever without any desktop coming up.
    I went to a textconsole, logged in and finished the upgrade (pacman -Syu) sucessfully. Then I entered "init 3" to kill the login window and started "startxfce4" without any problems. I changed my inittab to start with runlevel 3 only as a workaround.
    What can be wrong with the login window? Can anybody help?
    My /var/log/Xorg.0.log starts with:
    [   219.087]
    X.Org X Server 1.10.1
    Release Date: 2011-04-15
    [   219.087] X Protocol Version 11, Revision 0
    [   219.088] Build Operating System: Linux 2.6.38-ARCH x86_64
    [   219.088] Current Operating System: Linux lapi_acer 2.6.38-ARCH #1 SMP PREEMPT Tue May 3 07:40:34 CEST 2011 x86_64
    [   219.088] Kernel command line: root=/dev/disk/by-uuid/484885dc-96f3-4123-b2ab-ee75a61d5840 ro i915.modeset=0
    [   219.088] Build Date: 16 April 2011  12:02:01PM
    [   219.088] 
    [   219.088] Current version of pixman: 0.20.2
    [   219.088]    Before reporting problems, check http://wiki.x.org
            to make sure that you have the latest version.
    [   219.089] Markers: (--) probed, (**) from config file, (==) default setting,
            (++) from command line, (!!) notice, (II) informational,
            (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    [   219.090] (==) Log file: "/var/log/Xorg.0.log", Time: Mon May  9 18:06:39 2011
    [   219.090] (==) Using config directory: "/etc/X11/xorg.conf.d"
    [   219.090] (==) No Layout section.  Using the first Screen section.
    [   219.091] (==) No screen section available. Using defaults.
    [   219.091] (**) |-->Screen "Default Screen Section" (0)
    [   219.091] (**) |   |-->Monitor "<default monitor>"
    [   219.091] (==) No monitor specified for screen "Default Screen Section".
            Using a default monitor configuration.
    [   219.091] (==) Automatically adding devices
    [   219.091] (==) Automatically enabling devices
    [   219.091] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
    [   219.091]    Entry deleted from font path.
    [   219.091] (==) FontPath set to:
            /usr/share/fonts/misc/,
            /usr/share/fonts/TTF/,
            /usr/share/fonts/Type1/,
            /usr/share/fonts/100dpi/,
            /usr/share/fonts/75dpi/
    [   219.091] (==) ModulePath set to "/usr/lib/xorg/modules"
    [   219.091] (II) The server relies on udev to provide the list of input devices.
            If no devices become available, reconfigure udev or disable AutoAddDevices.
    [   219.091] (II) Loader magic: 0x7d6fa0
    [   219.091] (II) Module ABI versions:
    [   219.091]    X.Org ANSI C Emulation: 0.4
    [   219.091]    X.Org Video Driver: 10.0
    [   219.091]    X.Org XInput driver : 12.2
    [   219.091]    X.Org Server Extension : 5.0

    We cable internet users had similar problems in our neighborhood a while back. Sometimes the delay was there but more often than not, computers started OK. The system overview showed nothing wrong to the support types but one neighbor persisted and the techs found what they described as "confusing" reports on our node (takes in about four city blocks).
    They came out and worked on the node wiring and things returned to normal.
    The point is, sometimes the cable company doesn't know they have a local node problem until enough people rub their noses in it.

  • Client threads block forever in SSLSocketImpl.startHandshake

    Hi --
    We have an application which has 4 threads polling a webservice over HTTPS every 1-2 minutes. We don't control the server platform or webservice framework.
    We've encountered a problem where one by one the threads stop polling. This has occurred 3 times, every time over a weekend (the busiest time for our polling). Each thread "freezes" at a different time; all 4 threads are "frozen" after about 24 hours.
    JVM thread dumps suggests that the polling threads are blocked inside SSLSocketImpl.startHandshake; each one always has the same stacktrace within the JSSE & Axis libraries:
    "SOAP Client Thread: Footy Feed" prio=5 tid=0x2877D388 nid=0x518 runnable [2c3af000..2c3afd8c]
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at com.sun.net.ssl.internal.ssl.InputRecord.a(DashoA6275)
         at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
         - locked <0A931078> (a java.lang.Object)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
         - locked <0A931068> (a java.lang.Object)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
         at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
         at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:131)
         at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:370)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:88)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:147)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2719)
         at org.apache.axis.client.Call.invoke(Call.java:2702)
         at org.apache.axis.client.Call.invoke(Call.java:2378)
         at org.apache.axis.client.Call.invoke(Call.java:2301)
         at org.apache.axis.client.Call.invoke(Call.java:1758)
    ...(our application stacktrace)...
    Client: JDK1.4.1-b21, JBoss 3.2.7RC1, Axis 1.2RC2, Win2k Server SP4, no client certificates
    Server: Apache 1.3.29 (Unix) mod_ssl 2.8.16 OpenSSL 0.9.6j, mod_jk to Tomcat.
    There's at least one firewall between client and server.
    This problem appears similar: <http://issues.apache.org/bugzilla/show_bug.cgi?id=31832> & I've emailed the author.
    I've googled a lot of forums for a solution without success.
    Any help gratefully received.
    Thanks
    -- Richard Barnett

    Thanks for the reply.
    This case is different from that JMeter bug report as it's a SOAP request.
    We're not explicitly setting a timeout, but Axis defaults to a 10 minute timeout on its requests. The source seems to indicate that this doesn't apply when creating SSL sockets (although it is used when creating regular sockets). No timeout occurs in any case.
    -- Richard

  • My blackberry id is blocked forever ????

    recently I noticed that I cant download anything from app world so I looked at Blackberry ID and i got this: due security issue you will be blocked for 49419049 minutes.
     Anyone knows any solution ????
    Thank you guys!

    working now
    thanks! I owe you a beer

  • Non-Blocking I/O Implementation Issue

    Hi All,
    I am trying out the latest JDK 1.4 java.nio.* package. I modified the NBTimeServer and wrote a client which connects to the NBTimeServer and tries to pass messages to and fro. I always succeed to pass on roundtrip of msgs and then Server blocks my client forever. I have modified NBTimeServer to accomodate one client only. Any help or comments on this would be really appreciated. Code is below. Feel free to try it out if want to see what I am trying to convey in this message.
    /*******Server Code*******/
    Modified this code to test mulitple to and fro msgs between client and server.
    Only one client will ever be able to connect to this server during life of a server.
    My point here is to demonstrate the to and fro comm between one client and one server
    import java.io.*;
    import java.nio.*;
    import java.nio.channels.*;
    import java.nio.channels.spi.*;
    import java.net.*;
    import java.util.*;
    import java.nio.charset.*;
    import java.util.regex.*;
    // Listen on a port for connections and write back the current time.
    public class NBTimeServer {
    private static final int DEFAULT_TIME_PORT = 8900;
    // Constructor with no arguments creates a time server on default port.
    public NBTimeServer() throws Exception {
         acceptConnections(this.DEFAULT_TIME_PORT);
    // Constructor with port argument creates a time server on specified port.
    public NBTimeServer(int port) throws Exception {
         acceptConnections(port);
    // Accept connections for current time. Lazy Exception thrown.
    private static void acceptConnections(int port) throws Exception {
         // Selector for incoming time requests
         Selector acceptSelector = SelectorProvider.provider().openSelector();
         Selector rwSelector = SelectorProvider.provider().openSelector();
         // Create a new server socket and set to non blocking mode
         ServerSocketChannel ssc = ServerSocketChannel.open();
         ssc.configureBlocking(false);
         // Bind the server socket to the local host and port
         InetAddress lh = InetAddress.getLocalHost();
         InetSocketAddress isa = new InetSocketAddress(lh, port);
         ssc.socket().bind(isa);
         // Register accepts on the server socket with the selector. This
         // step tells the selector that the socket wants to be put on the
         // ready list when accept operations occur, so allowing multiplexed
         // non-blocking I/O to take place.
         SelectionKey acceptKey = ssc.register(acceptSelector,
                             SelectionKey.OP_ACCEPT);
         int keysAdded = 0;
         // Here's where everything happens. The select method will
         // return when any operations registered above have occurred, the
         // thread has been interrupted, etc.
         while ((keysAdded = acceptSelector.select()) > 0) {
         // Someone is ready for I/O, get the ready keys
         Set readyKeys = acceptSelector.selectedKeys();
         Iterator i = readyKeys.iterator();
         // Walk through the ready keys collection and process date requests.
         while (i.hasNext()) {
              SelectionKey sk = (SelectionKey)i.next();
              i.remove();
              // The key indexes into the selector so you
              // can retrieve the socket that's ready for I/O
              ServerSocketChannel nextReady =
              (ServerSocketChannel)sk.channel();
              // Accept the date request and send back the date string
              Socket s = nextReady.accept();
                        SocketChannel sc = s.getChannel();
    System.out.println("Got client channel..");
              sc.configureBlocking(false);
              SelectionKey readKey = sc.register(rwSelector,
                             SelectionKey.OP_READ|SelectionKey.OP_WRITE);                     
              int count = 0;
    while(true) {
    if((count = rwSelector.select(1000L)) > 0) {
    Set readKeys = rwSelector.selectedKeys();
    Iterator i1 = readKeys.iterator();
    while(i1.hasNext()) {
    System.out.println("Loop in Iterator");
    SelectionKey sk1 = (SelectionKey)i1.next();
    i1.remove();
    if(sk1.isReadable()) {
    DataInputStream sin = new DataInputStream(new BufferedInputStream(s.getInputStream(), 4096));
    System.out.println(sin.readInt());
    if(sk1.isWritable()) {
    DataOutputStream sout = new DataOutputStream(new BufferedOutputStream(s.getOutputStream(), 4096));
    PrintWriter out = new PrintWriter(sout, true);
              Date now = new Date();
              out.println(now);
    // Entry point.
    public static void main(String[] args) {
         // Parse command line arguments and
         // create a new time server (no arguments yet)
         try {
              NBTimeServer nbt = new NBTimeServer();
         } catch(Exception e) {
              e.printStackTrace();          
    /******End Server Code********/
    /*****Begin Client Code********/
    import java.io.*;
    import java.net.*;
    import java.util.*;
    // Listen on a port for connections and write back the current time.
    public class NBTimeClient {
    private static final int DEFAULT_TIME_PORT = 8900;
    public static void main(String args[]) throws Exception {
    InetAddress lh = InetAddress.getLocalHost();
    Socket s = new Socket(lh, DEFAULT_TIME_PORT);
    DataInputStream din = new DataInputStream(new BufferedInputStream(s.getInputStream(), 4096));
    DataOutputStream dout = new DataOutputStream(new BufferedOutputStream(s.getOutputStream(), 4096));
    //Read the time
    System.out.println(din.readLine());
    //send some junk which is read by server
    dout.writeInt(1299);
    dout.flush();
    //read time again -- I never get anything here and I am blocked here...
    System.out.println(din.readLine());
    //send some junk back to the server
    dout.writeInt(1299);
    dout.flush();
    s.close();
    /*******End Client Code**********/
    thanks,
    Xtrimity

    The reason it blocks forever is that you need to keep reusing your main select. That is where the non-blocking event will come from. Here is a bit of code that doesn't block forever.
    Tim
    http://tim.owlmountain.com
    import java.io.*;
    import java.nio.*;
    import java.nio.channels.*;
    import java.nio.channels.spi.*;
    import java.net.*;
    import java.util.*;
    import org.apache.log4j.*;
    public class NBServer3 {
    int _port = 4000;
    Selector _selector = null;
    ServerSocketChannel _selectableChannel = null;
    int _keysAdded = 0;
    static Category log =
    Category.getInstance(NBServer3.class.getName());
    static String QUIT_SERVER = "quit";
    public NBServer3() {
    public NBServer3( int port ) {
    this._port = port;
    public void initialize()
    throws IOException {
    this._selector = SelectorProvider.provider().openSelector();
    this._selectableChannel = ServerSocketChannel.open();
         this._selectableChannel.configureBlocking(false);
         InetAddress lh = InetAddress.getLocalHost();
         InetSocketAddress isa = new InetSocketAddress(lh, this._port );
         this._selectableChannel.socket().bind(isa);
    public void finalize()
    throws IOException {
    this._selectableChannel.close();
    this._selector.close();
    public void acceptConnections()
    throws IOException {
    Selects a set of keys whose corresponding channels are ready for I/O
    operations. This method performs a non-blocking selection operation.
    If no channels have become selectable since the previous selection
    operation then this method immediately returns zero.
    Returns:
    The number of keys, possibly zero, whose ready-operation sets
    were updated by the selection operation
    do {
    SelectionKey acceptKey =
    this._selectableChannel.register( this._selector,
    SelectionKey.OP_ACCEPT );
    log.debug( "Acceptor loop..." );
    while (( this._keysAdded = acceptKey.selector().select()) > 0 ) {
    log.debug( "Selector returned "
    + this._keysAdded + " ready for IO operations" );
    Set readyKeys = this._selector.selectedKeys();
    Iterator i = readyKeys.iterator();
    while (i.hasNext()) {
    SelectionKey key = (SelectionKey)i.next();
    i.remove();
    if ( key.isAcceptable() ) {
    ServerSocketChannel nextReady =
    (ServerSocketChannel)key.channel();
    log.debug( "Processing selection key read="
    + key.isReadable() + " write=" + key.isWritable() +
    " accept=" + key.isAcceptable() );
    Socket s = nextReady.accept();
    s.getChannel().configureBlocking( false );
    SelectionKey readKey =
    s.getChannel().register( this._selector,
    SelectionKey.OP_READ );
    readKey.attach( s );
    else if ( key.isReadable() ) {
    SelectableChannel nextReady =
    (SelectableChannel) key.channel();
    log.debug( "Processing selection key read="
    + key.isReadable() + " write=" + key.isWritable() +
    " accept=" + key.isAcceptable() );
    Socket socket = (Socket) key.attachment();
    BufferedReader in = new BufferedReader(
    new InputStreamReader( socket.getInputStream() ));
    String line = null;
    if ( (line = in.readLine() ) != null )
    log.debug( line );
    log.debug( "End acceptor loop..." );
    } while ( false ); //FIXIT tim this should be false. justa test
    public static void main( String[] args ) {
    BasicConfigurator.configure();
    NBServer3 nbServer = new NBServer3();
    try {
    nbServer.initialize();
    } catch ( IOException e ) {
    e.printStackTrace();
    System.exit( -1 );
    try {
    nbServer.acceptConnections();
    catch ( IOException e ) {
    e.printStackTrace();
    log.error( e );

  • Toolkit.createCustomCursor(...) blocks when provided with an animated GIF

    Hi everyone:
    Here is a code snippet from an application of mine:
    // Loading an image: works fine. duke.gif is an animated Duke icon found in the source code version of J2SDK 1.3.1.
    ImageIcon imageIcon = new ImageIcon("duke.gif");
    // Conversion into an image: works fine too. I checked its proper termination with a MediaTracker, which I removed after determining that getImage() does not block at all.
    Image image = imageIcon.getImage();
    // This method blocks forever!
    Cursor myCursor = Toolkit.getDefaultToolkit.createCustomCursor(image, new Point(0, 0), "Duke");After testing with a few other GIF images, I could determine that this blocking problem seems to occur only with animated GIF images. Are animated GIFs supported as cursor images at all? Also, what is the best method to use the Toolkit.getBestCursorSize(...) to properly size the loaded image for use as a cursor icon?
    Thanks in advance for helping...
    Jean-Fran�ois Morin

    I think the problem may be that your using an animated gif. If you read the doc on the Curson class it says that Cursor is a bitmap representation of the mouse cursor. Bitmaps do not generally support animation. Also it is likely the createCustomCursor method is waiting for a call to ImageConsumer.imageComplete(). I am not sure, but if the GIF animation loops this function may never get called. This could cause your hangup. I would suggest trying a non-animated GIFf produced from the same program to ensure that your paint program is producing compliant GIFs. If that works I would assume the problem is that Cursor does not support animation at this time. I could be wrong about that, but there is nothing in the documentation to indate that it would.
    NoOneLeft

  • Implementing non-blocking read

    Hi all
    I have some doubts about implementing non-blocking io in my application.
    I am using Jsch library (an ssh implementation) to open an ssh connection with a host. The API only provides me with methods to open a connection and retreive the input & output streams. I want to make my read on inputstream non-blocking.In such a case is it possible to use nio for the purpose?
    If it's not possible then I am planning to use threading to make read() non-blocking. Here also i need some clarifications. I am planning to use a ThreadPoolExecutor to create a thread pool for reading data. SO whenever i have a read i'll assign this task to the pool which will use one of the free threads to execute the inputStresm.read().
    Now the question is if one of the threads in this pool blocks forever during a read since it didn't get any response from the other side, is there a way to stop that read and make that thread free again to execute more tasks? or will the thread block forever till the application is closed?
    In my case i cannot afford to have too many such blocked threads, since this application will not be restarted very often. Once it is started it can go on for may be days or months.
    Please suggest what would be best in my case taking into account performance as most important factor.
    Thanks in advance.
    Anu

    endasil wrote:
    First of all, let me state that I agree with the others in saying that I don't fully agree with your premises.
    That said, I believe that this does a non-blocking read based on the contract of InputStream.available() and .read(byte[], int, int):
    private int nonBlockingRead(InputStream in, byte[] buffer) throws IOException {
    return in.read(buffer, 0, Math.min(in.available(), buffer.length));
    If the InputStream is obtained from a JSSE socket then it is my understanding that available() always returns zero. This is allowed under the InputStream.available() contract as defined in the Javadoc - http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#available() . If I am right then your code will never read anything from a JSSE socket InputStream and I would suspect that Jsch is using JSSE sockets.

  • Blocking when using RTMPS

    While using RTMPS to push large amounts of data to the flash player we've begun seeing deadlock occurring in the FlexClient on the server.
    This is the usage:
    Destination A:
    pushes 1 message every 5 seconds containing an array of 500-5000 objects (each object ~300K)
    Destination B:
    pushes 1/message/second containing a small object (by small I mean it has at most 10 String or Number fields on them) onto a subtopic
    pushes 1/message every 30 seconds containing a list of 10 key-value pairs onto a second subtopic
    pushes 1/message every 30 seconds containing a list of 10 key-value pairs onto a third subtopic
    JConsole shows the FlexClient blocks in push().  We attached a debugger and found the RTMP endpoint has a tcMessageQueue that has all of the messages in it.  During normal execution this queue has 1 or 0 messages in it, but when the threads are blocking the queue grows.
    The app can run for several minutes before getting into a blocked state.  Other users are not blocked (they are using their own destinations).  The flash player itself remains responsive, but simply isn't getting any data.  I've looked at the BlazeDS source which shows synchronized blocks on "lock" and on "queue" but I can't see why either of those are blocking "forever".
    This is all running LCDS 2.6.1 on both linux and windows servers.  Does anybody have any similar issues?  Any suggestions on what's causing the FlexClient to block? 

    I tried to run it in a separate thread:
    executionMgr = new ExecutionManangementRunnable(listener, process);
                   Callable callable = Executors.callable(executionMgr, null);
                   FutureTask future = new FutureTask(callable);
                   Thread thread = new Thread(future);
                   thread.setDaemon(true);
                   thread.start();
                   try {
                        future.get(1, TimeUnit.MINUTES);
                   } catch (InterruptedException e) {
                        // TODO handle catch block
                        e.printStackTrace();
                   } catch (ExecutionException e) {
                        // TODO handle catch block
                        e.printStackTrace();
                   } catch (TimeoutException e) {
                        // TODO handle catch block
                        e.printStackTrace();
                   }I still get the same problem with main thread being blocked. Does anyone know why?'
    //mikael

  • Commit processing in Forms 10g, what triggers fire etc.

    In the oracle documentation there used to be a commit processing flowchart that said exactly what triggers fire on commit. Don’t seem to be able to find such a thing online.
    This started by trying to work out if when-validate-item always fired on commit, even if it had been fired when the value was changes. It has turned into a more general question about the above and if it is any different in forms 10g and is it any different to 6i, 9i...?
    I.e. how do you answer the standard oracle job interview question 'what triggers are fired when you commit in forms?'.
    Oracle seems to of hidden the information, anyone know the answer?
    Regards,
    Ben

    Hello,
    Something like this:
    POST-TEXT-ITEM
    POST-RECORD
    POST-BLOCK
    PRE-COMMIT
    PRE-UPDATE
    ON-UPDATE
    POST-UPDATE
    PRE-INSERT
    ON-INSERT
    POST-INSERT
    POST-FORM-COMMIT
    ON-COMMIT
    POST-DATABASE-COMMIT
    PRE-BLOCK
    PRE-RECORD
    PRE-TEXT-ITEM
    WHEN-NEW-ITEM-INSTANCE
    Francois

  • Order of commit in a forms

    When you have say 3 table based blocks in a form, when u issue a commit what order does forms commit those blocks?
    Thanks
    Lewis

    Duplicate message. Please use this one:
    Order of commit in a forms

  • Administrative document blocked when sending message

    Hi,
    For EMCS I am using excise duty in GTS. One of the messages which are used for this is an active message 'Send explanation of Delay'. No passive feedback message is expected in reaction to this message. Still, when executing this message, an idoc is created and subsequently the document is blocked. The system seems to automatically block the document after creating an idoc in method /SAPSLL/ECC_IDOC_CREATE.
    This is an issue because I'm not done processing the document and I should be able to change it. Since no feedback message will come from customs there is no trigger to unblock my document (apart from the admin transaction for unblocking) and it will remain blocked forever.
    This seems strange to me because SAP should have foreseen this as a standard message in the EMCS flow. Does anyone else have this issue or did I miss something in my customizing? The message type is set to 1 Completion.
    Thanks!
    Mireille

    Hi,
    FYI,
    I created an incident and got the following reply:
    thanks for contacting SAP Support in this matter.
    The observed behavior is
    caused by the Customs systems behavior. In
    case of a posive explanation there
    will be no reply from customs. But
    in case of negative explanation an error
    will be send.
    Therefore the automatic update of actrivity sequence is not
    possible
    here.
    There are two options to dissolve this situation:
    1)
    directly send IE818 if legally ok
    2) use TA /sapsll/cdoc_stares and /sapsll/cdoc_act_clo to get activity
       in correct state again.
    Hopefully the given information can help to solve the issue.
    So there are no plans by SAP of resolving this.

  • FileInputStream.read()  and non-blocking file i/o

    According to the API, FileInputStream.read() is :
    public native int read() throws IOException
    Reads a byte of data from this input stream. This method blocks if no input is yet available.
    Returns:
    the next byte of data, or -1 if the end of the file is reached.In what instances does the read() blocks? Is there a danger that the call to read() would block forever?

    thanks martian!
    is the ff code right enough to prevent i/o blocking?
      FileInputStream fis = new FileInputStream(src);
      FileOutputStream fos = new FileOutputStream(sPersistorFolder+src.getName());
      if(fis.available() > 0) {
        int c = -1;
        while((c=fis.read()) != -1) {
          fos.write(c);
      fis.close();
      fos.close();

  • Client blocks after a crash while registering for change notification

    Hi, I just moved this message from the Jdbc forum as being of more general interest, not limited to any Java client.
    I got a client crash since the JVM was short of heap space (the involved application was inserting data).
    Then I run the application again.
    Connection was ok, but then the client was blocked forever while waiting for a server reply (in a socket read) during the execution of a select intended to register a change notification listener.
    It seems that the crashed session left around something dirty in the server, concerning the change notification machinery. Perhaps some locks on concerned tables.
    Restarting the server solved the problem, although far from optimal.
    Server is 11gR2.
    Any suggestion to cleanup after such a crash is welcome, since so far I guessed that a terminated session (whether crashed or not) should have cleaned up locks and alike.

    since so far I guessed that a terminated session (whether crashed or not) should have cleaned up locks and alike.it is possible/probable that Oracle RDBMS does not know or care that the client crashed.
    It is likely that Oracle is waiting for additional requests from this client session.
    I doubt that any "clean up" has been performed.

  • Skype blocks accounts and numbers without explanat...

    Hei Everybody,
    Just let you know about skype unbelievable behaviour with blocking 
    Accounts and numbers.
    We have skype + skype kredit for many years and call mostly one family landline number all the time -  from our main account.
    One beautifull afternoon I was sitting in my room talking ti this number as I have done for years. Without knowing this fact, my wife from another room using same account i. e same skype kredit has tried to call her family.
    Without any message / notice from skype that another person is using the account/kredit she successfully connect an begins talking - a landline number as well - so for 5 min we talk to different numbers simultaneously from same account / kredit without any alarm notice from skype and without knowing about each other    Stupid , isn' t it ? But this is only a stupid mistake evrybody can do - skype must have a solution for this - we are living in 21 century.
    But guess what happening - after 5 min simulaneoys talk - we have been thrown out from tjis account  and the account + our main landline number is blocked by skype. 
    After several hours writing mails and talking to a several skype consultants providing proof of purchasing etc - our account was unblocked. 
    But guess what - the land line number we call 80 % of our credit last years is still blocked because skype thinks that this number is used for fraudelent attempts - any attempts to explain that everything is stupud mistake was receiving automatic draft mails that skype is investigating the number. 
    WHAT WAS OUR SURPRISE TODAY WHEN WE RECEIVED MAIL FROM SKYPE THAT THIS NUMBER IS BLOCKED FOREVER AND IF WE WANT TO CALL THIS NUMBER WE NEED TO FIND ANOTHER SOLUTION !!!!!!!!!!
    Can you lmagine all this ??????
    Тhe most funny / absurd / tragic thing is that rest of our family living in different countries also can not use this landline number (80 %  of their calls are also to this number) - so all we need to change skype with some other solution - AMAZING AND UNBELIEVEBLE !!!!!!!!!!!!!

    Try to reset all Skype settings.
    Quit Skype or use Windows Task Manager to kill any Skype.exe process. Go to Windows Start and in the Search/Run box type %appdata% and then press Enter or click the OK button. The Windows File Explorer will pop up. There locate a folder named “Skype”. Rename this folder to something different, e.g. Skype_old.
    If you are on the latest Skype 6.5/6.6/6.7/6.9/6.10/6.11/6.13/6.14 version, then do also this:
    Go to Windows Start and in the Search/Run box type %temp%\skype and then press Enter or click the OK button. Delete the DbTemp folder.
    Restart Skype.

Maybe you are looking for