Spring TCP Socket client not receiving data from Mainframe

前端 未结 2 720
灰色年华
灰色年华 2021-01-29 01:08

I am trying to use this example to send and receive the data to and from a Mainframe machine that uses HEX data to communicate. So I have the following in my config

相关标签:
2条回答
  • 2021-01-29 01:49

    If the mainframe doesn't close the connection at the end of the response, as it probably doesn't, the read loop will never exit. The loop needs to be aware of the expected or actual length of the response somehow.

    The serializers also surely need to do some EBCDIC conversion?

    0 讨论(0)
  • 2021-01-29 02:04

    This is not a DEBUG log, only INFO; your log4j configuration must be wrong.

    inside deserialize

    This is simply the receiving thread waiting for data; it is stuck in your for loop waiting for the mainframe to close the connection - I suggest you add some debug inside the loop.

    EDIT

    Commons-logging is missing from your POM...

    <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.2</version>
    </dependency>
    

    or switch to log4j2

    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>2.7</version>
    </dependency>
    

    and create a log4j2 config file.

    Spring Framework 5 now uses its own implementation of commons-logging that does not support log4j 1.x.

    0 讨论(0)
提交回复
热议问题