We recently developed a code change for our application. The previous code used Microsoft.XMLDOM and Microsoft.XMLHTTP libraries to pull XML data from a https server (users need to provide id and password to log in and retrieve data).
Using Java libraries, we managed to update the code, and the retrieval process works correctly for Windows users, but for MacOS users the Java retrieval process returns blank (without any errors).
Do Mac users need something else (like a server certificate) to be able to connect to the https servlet and retrieve the data? Unfortunately there is no Debugging on Notes for the Java code, so I cannot se what is failing… or is there some way to see it?
Hi Everyone! thanks for the input… I managed to redirect the results to a file, and this is what I believe I should focus on:
Caused by: java.security.cert.CertificateException: Timeout occurred waiting for message.
at com.ibm.workplace.internal.notes.security.ssl.NotesX509TrustManager.CheckCertificateTrustInNotesAddressBook(NotesX509TrustManager.java:73)
at com.ibm.notes.internal.federated.manager.X509TrustManageForNFLService.checkServerTrusted(X509TrustManageForNFLService.java:201)
at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:985)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1496)
I also added some comments to each step of the code, and it seems to be stopping somewhere around these lines:
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(vUser, vPassword));
HttpClient httpClient =
HttpClientBuilder.create()
.setDefaultCredentialsProvider(credentialsProvider).build();
My understanding from the log is that there is some certificate missing, probably on the user side. How can I get that certificate (or is it something each user should generate?), and how do I get it in the client’s Lotus Notes?
I already added Print statements after each call to java process, and they are all displayed (which I beleive means it goes through all steps without errors). Also added an OnErrorr handler, still doesn’t pick any errors.
Also added System.out.println inside the Java code, but I believe these are not displayed in Notes.
Subject: Have the same issue on IBM Notes application running a Java Library which tries to use SSL to connect to a DB2 server
Here is the error only Mac users are experiecing. If we manually add the IBMCertTrustStore keys to java cacerts file the same Java Code (DB2 Connection using SSL) works without errors. So, it appears tha something is missing on Java for Mac or on IBM Notes for Mac. Windows users do not have experience this error. Here is the raised error:
SQL Exception: [jcc][t4][2030][11211][3.72.44] A communication error occurred during operations on the connection’s underlying socket, socket input stream,
or socket output stream. Error location: Reply.fill() - socketInputStream.read (-1). Message: java.security.cert.CertificateException: Timeout occurred waiting for message… ERRORCODE=-4499, SQLSTATE=08001
com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2030][11211][3.72.44] A communication error occurred during operations on the connection’s underlying socket, socket input stream,
or socket output stream. Error location: Reply.fill() - socketInputStream.read (-1). Message: java.security.cert.CertificateException: Timeout occurred waiting for message… ERRORCODE=-4499, SQLSTATE=08001
at com.ibm.db2.jcc.am.b1.a(b1.java:339)
at com.ibm.db2.jcc.t4.a.a(a.java:571)
at com.ibm.db2.jcc.t4.a.a(a.java:555)
at com.ibm.db2.jcc.t4.a.a(a.java:550)
at com.ibm.db2.jcc.t4.a.b(a.java:1665)
at com.ibm.db2.jcc.t4.a.a(a.java:1700)
at com.ibm.db2.jcc.t4.a.h(a.java:497)
at com.ibm.db2.jcc.t4.a.flush_(a.java:413)
at com.ibm.db2.jcc.am.Agent.flowOutsideUOW(Agent.java:261)
at com.ibm.db2.jcc.t4.b.b(b.java:1260)
at com.ibm.db2.jcc.t4.b.b(b.java:818)
at com.ibm.db2.jcc.t4.b.a(b.java:789)
at com.ibm.db2.jcc.t4.b.a(b.java:435)
at com.ibm.db2.jcc.t4.b.a(b.java:408)
at com.ibm.db2.jcc.t4.b. (b.java:346)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:234)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:200)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:472)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:113)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at DB2Lookup.NotesMain(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at lotus.domino.JavaConnectInvoker.invoke(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at lotus.domino.JavaConnectLoader.invoke(Unknown Source)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:4885)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5248)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:94)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3617)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.ibm.rcp.personality.framework.internal.RCPApplication.run(RCPApplication.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at com.ibm.rcp.core.internal.launcher.Main.startLaunch(Main.java:885)
at com.ibm.rcp.core.internal.launcher.Main.main(Main.java:1295)
at com.ibm.rcp.core.internal.launcher.Main.run(Main.java:1215)
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Timeout occurred waiting for message.
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:961)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:757)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
at com.ibm.db2.jcc.t4.ae.b(ae.java:2054)
at com.ibm.db2.jcc.t4.ae.a(ae.java:2002)
at com.ibm.db2.jcc.t4.a.h(a.java:482)
… 59 more
Caused by: java.security.cert.CertificateException: Timeout occurred waiting for message.
at com.ibm.workplace.internal.notes.security.ssl.NotesX509TrustManager.CheckCertificateTrustInNotesAddressBook(NotesX509TrustManager.java:73)
at com.ibm.notes.internal.federated.manager.X509TrustManageForNFLService.checkServerTrusted(X509TrustManageForNFLService.java:201)
at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:985)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1496)
… 69 more