0

I can't seem to get my head around this, so I'm asking for your help.

We are using JPOS to transfer some messages between ourselves and a business partner, and we are seeing errors about "shutdownOutput() is not supported in SSLSocket". This seems to be a rare issue, as another developer remarked upon in 2012:

Why am I the first person to encounter this issue? I presume I am missing something simple. Or nobody else uses SSL with jpos. Or nobody closes connections...

The subsequent discussion references a question here on SO, but the solutions suggested seem impossible to apply due to the following flow of events:

  1. we are making a single call into the JPOS library to send a request (org.jpos.iso.BaseChannel.send(ISOMsg msg))
  2. we are making a single call into the JPOS library to receive a response (ISOMsg response = org.jpos.iso.BaseChannel.receive())
  3. through a number of internal methods and submethods, JPOS receives the response, handles it, and closes the socket using the problematic "shutdownOutput()" call
  4. while attempting to close the socket, it will throw an exception -- and in doing so will discard the response we are interested in

It seems we have no "injection point" where we can actually receive the message, but not close the socket (we could do that ourselves, or handle the exception differently).

What am I not seeing here?

FYI, we are using JPOS v1.7.0 from 2010, but from reading the current code it seems that even v2.1.7 is doing it the same way.

Edit: Also, there is some logging functionality, but it seems to be completely contained within the receive() call. I could perhaps investigate in further detail if I could inspect the log, but there seems to be no place where there is (or where I can) set (or pass in) a LogListener. Where do I find info on how JPOS logs are managed, how can I view them?

EDIT 2: I was being blind while reading the code. Based on very insightful comments, we will have to upgrade our JPOS instance to at least v1.8.8 to obtain the fix for this issue.

KlaymenDK
  • 714
  • 9
  • 31
  • The comments in the forum you linked suggest one of the jPOS devs fixed the issue. So try the current version and see if you still have the problem. – President James K. Polk Jul 09 '19 at 13:39
  • Thanks, but the newest version works the same in this regard. – KlaymenDK Jul 09 '19 at 13:44
  • 1
    The change was made a long time ago: https://github.com/jpos/jPOS/commit/eccfa94f9c316c1505ddb2d98ade6c2943dba75c – President James K. Polk Jul 09 '19 at 15:07
  • 1
    Calling `org.jpos.iso.BaseChannel.receive()` should not call any shutdown method. Perhaps you can describe your issue in more detail, with sample code to reproduce it in the jPOS users mailing list, so we can file an issue and work on it (you can go ahead and file it yourself if you prefer). – apr Jul 10 '19 at 18:38
  • Apparently I was blind: it must be throwing an exception within the try/catch block to reach that shutdown command -- but calling the shutdown command also obscures the original problem. Unfortunately I don't have a test environment for this, and have no idea how to emulate this bit. I'll investigate updating the version we use. – KlaymenDK Jul 12 '19 at 09:43

0 Answers0