Skip to content

Exception thrown: java.io.IOException: Bad file descriptor in nativeDrain #254

@adrianromeroopenbravo

Description

@adrianromeroopenbravo

Hello I am using this library version 5.2.1 in Windows. I checked all the serial pararmeters: bauds, parity, stop bit, ... and I get the following exception and stack trace while writing to a serial port just opened.

INFO: Message out: 05
juil. 11, 2025 3:11:23 PM org.openbravo.caisse.connections.ReadWriteTaskSerial lambda$startReadWriteTask$2
SEVERE: Bad file descriptor in nativeDrain
java.io.IOException: Bad file descriptor in nativeDrain
at gnu.io.RXTXPort.nativeDrain(Native Method)
at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1298)
at org.openbravo.caisse.connections.ReadWriteTaskSerial.lambda$startReadWriteTask$2(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:1589)

Any clue what can be the problem and how to solve it?

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions