Hi all, Need help on sudden error for calling Paym...
# cfml-general
s
Hi all, Need help on sudden error for calling Payment gateway with Java class. We have integrated heartland payment gateway with java class files.
createobject("java",'com.global.api.paymentMethods.CreditCardData').init()>
Here is the error details:
Copy code
javax.net.ssl.SSLException
MESSAGE: closing inbound before receiving peer's close_notify

STACKTRACE:

javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:129)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:255)
	at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:645)
	at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:624)
	at com.mysql.cj.protocol.a.NativeProtocol.quit(NativeProtocol.java:1319)
	at com.mysql.cj.NativeSession.quit(NativeSession.java:182)
	at com.mysql.cj.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:1750)
	at com.mysql.cj.jdbc.ConnectionImpl.close(ConnectionImpl.java:720)
	at coldfusion.server.j2ee.sql.JRunConnection.close(JRunConnection.java:478)
	at coldfusion.server.j2ee.sql.pool.JDBCPool.expire(JDBCPool.java:863)
	at coldfusion.server.j2ee.pool.ObjectPool.closeAllResources(ObjectPool.java:434)
	at coldfusion.server.j2ee.sql.pool.JDBCPool.closeAllResources(JDBCPool.java:1108)
	at coldfusion.server.j2ee.pool.ObjectPool.destroy(ObjectPool.java:449)
	at coldfusion.server.j2ee.sql.pool.JDBCManager.removePool(JDBCManager.java:198)
	at coldfusion.server.j2ee.sql.pool.JDBCManager.clearPools(JDBCManager.java:207)
	at coldfusion.server.CFService.stop(CFService.java:3868)
	at coldfusion.server.j2ee.CFStartUpServlet.destroy(CFStartUpServlet.java:573)
	at coldfusion.bootstrap.BootstrapServlet.destroy(BootstrapServlet.java:333)
	at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1304)
	at org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1606)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5527)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1414)
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1403)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:988)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1414)
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1403)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:988)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
	at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:502)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
	at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:986)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
	at com.adobe.coldfusion.launcher.Launcher.stop(Launcher.java:2193)
	at com.adobe.coldfusion.launcher.Launcher$1.run(Launcher.java:1121)
	at java.base/java.lang.Thread.run(Thread.java:834)
s
Looks like you're running into this bug with the MySQL connector and Java 11: https://bugs.mysql.com/bug.php?id=93590
s
Thank you @seancorfield This call is to the payment gateway, no MySQL connection on the call I assume.
s
The stacktrace indicates the problem occurs when the JRun-based connection pool inside CF tries to close a connection to MySQL. That bug report explains why and the combination of driver and JDK version that cause it.
That error is not coming from the payment gateway or your code -- and my reading of the bug report is that it is a harmless exception that you can ignore.
s
I am not able to make the call to payment gateway, stopped with this error.
Here is the stack error
Copy code
MessageConnection resetStackTracejava.net.SocketException: Connection reset at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186) at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140) at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:448) at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:165) at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:108) at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152) at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402) at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567) at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at java.base/sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1356) at java.base/sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1331) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:241) at com.global.api.gateways.Gateway.sendRequest(Gateway.java:134) at com.global.api.gateways.Gateway.sendRequest(Gateway.java:78) at com.global.api.gateways.XmlGateway.doTransaction(XmlGateway.java:11) at com.global.api.gateways.PorticoConnector.processAuthorization(PorticoConnector.java:440) at com.global.api.builders.AuthorizationBuilder.execute(AuthorizationBuilder.java:701) at com.global.api.builders.AuthorizationBuilder.execute(AuthorizationBuilder.java:22) at com.global.api.builders.BaseBuilder.execute(BaseBuilder.java:22) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at coldfusion.runtime.StructBean.invoke(StructBean.java:509) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4365) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4217) at cfheartland_payment2ecfm1231779933.runPage
s
That is a completely unrelated error to the one you posted.
s
Above one is the actual error, might be I confused by seeing CF exception logs.
s
"Connection reset" is a pretty common error -- could be all sorts of things. Perhaps your firewall is disallowing the HTTPS traffic to whatever domain/port the payment gateway uses? Perhaps you have an error in the URL you configured? Perhaps the payment gateway is offline for maintenance or overwhelmed with traffic?
s
As per payment gateway it is good from their side, I will check other possibilities. Thanks a ton for your quick help @seancorfield