Search code examples
javasslhttpsxpageshcl-domino

Different java.protocol.handler.pkgs settings in Domino causing error in XPages java


I have two different java settings on two different domino servers using same version. 12.0.2 FP2.

here you see the settings found in System.properties for the servers:

Server 1 This one is working fine when using urlconnection

java.protocol.handler.pkgs=com.ibm.domino.internal.protocol

Server 2 This one is not working when using urlconnection

java.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol

update: I misstankenly put the wrong line on the wrong server initially, should be ok now,

---

Strangely when testing java.net.UrlConnection in an agent it works on both server. but when doing it in a java class that is used in XPages it does not work.

this is the error we get on server 2.

[1410:0011-0454] 2023-09-07 12:21:45 HTTP JVM: java.lang.ClassCastException: com.sun.net.ssl.internal. www.protocol.https.HttpsURLConnectionOldImpl incompatible with javax.net.ssl.HttpsURLConnection

what can be the reason for this setting begin different and how can I make them the same?

this is currently causing me to write different XPages java code based on which server the xpage/script is running on when making java.net.UrlConnection calls to https.

note: I only assume that value of java.protocol.handler.pkgs is the cause of this, it could ofcourse be something else but that is my best guess.

On server 2 we also have some other settings that is pointing to wrong path and is missing on server 1

enter image description here


Solution

  • for some reason we can no longer reproduce the problem with urlconnection for server 2.

    the only thing we can think of that has changed since we first discovered the problem is that we did a change to an internet site document to enable SSO.

    Internet Site document -> Configuration -> TLS Options -> keyfileName and added the hostname there instead of the keyfile. (as described in the documentation when not using keyfiles)