IBM / JTOpen

IBM Toolbox for Java, an IBM i communications library
https://ibm.github.io/JTOpen/
Other
56 stars 26 forks source link

Upgraded application from 20.0.3 to 20.0.6. Now jdbc connection is failing. #144

Closed wigglethorpe closed 7 months ago

wigglethorpe commented 7 months ago

The only change I made was upgrading the JT400 library from 20.0.3 to 20.0.6.

Receive either

Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.8.0_392] at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[?:1.8.0_392] at java.net.SocketInputStream.read(SocketInputStream.java:171) ~[?:1.8.0_392] at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:1.8.0_392] at com.ibm.as400.access.DataStream.readFromStream(DataStream.java:54) ~[jt400-20.0.6-native.jar:JTOpen 20.0.6] at com.ibm.as400.access.ClientAccessDataStream.construct(ClientAccessDataStream.java:61) ~[jt400-20.0.6-native.jar:JTOpen 20.0.6] at com.ibm.as400.access.AS400ThreadedServer.run(AS400ThreadedServer.java:359) ~[jt400-20.0.6-native.jar:JTOpen 20.0.6] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_392]

or

[ERROR] 2023-11-27 11:27:28.260 [main] bpsStracFTPProcessor - The connection does not exist. java.sql.SQLNonTransientConnectionException: The connection does not exist. at com.ibm.as400.access.JDError.createSQLExceptionSubClass(JDError.java:877) ~[jt400-20.0.6-native.jar:JTOpen 20.0.6] at com.ibm.as400.access.JDError.throwSQLException(JDError.java:431) ~[jt400-20.0.6-native.jar:JTOpen 20.0.6] at com.ibm.as400.access.AS400JDBCConnectionImpl.checkOpen(AS400JDBCConnectionImpl.java:504) ~[jt400-20.0.6-native.jar:JTOpen 20.0.6] at com.ibm.as400.access.AS400JDBCConnectionImpl.prepareStatement(AS400JDBCConnectionImpl.java:2317) ~[jt400-20.0.6-native.jar:JTOpen 20.0.6] at com.ibm.as400.access.AS400JDBCConnectionImpl.prepareStatement(AS400JDBCConnectionImpl.java:2106) ~[jt400-20.0.6-native.jar:JTOpen 20.0.6] at com.ibm.as400.access.AS400JDBCConnectionImpl.prepareStatement(AS400JDBCConnectionImpl.java:2101) ~[jt400-20.0.6-native.jar:JTOpen 20.0.6] at com.bpservice.bpsstracftpprocessor.data.EMSNEMSIS.(EMSNEMSIS.java:33) ~[classes/:?] at com.bpservice.bpsstracftpprocessor.processors.NemsisProcessor.loadXMLFile(NemsisProcessor.java:337) [classes/:?] at com.bpservice.bpsstracftpprocessor.processors.NemsisProcessor.ProcessXMLFiles(NemsisProcessor.java:176) [classes/:?] at com.bpservice.bpsstracftpprocessor.bpsStracFTPProcessor.main(bpsStracFTPProcessor.java:115) [classes/:?]

The only difference is the library. Did something change in the connections between the two libraries?

wigglethorpe commented 7 months ago

This was totally my fault. I was initializing the AS400JDBCConnection during the init phase of main and finally had a long enough process from where it is used, that it hit the timeout at time of first access and then subsequently shut down the connection to the System i.