You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The containers published on docker hub airhacks/glassfish:v5 and airhacks/glassfish:5.1.0 use openjdk version "1.8.0_121" generating the following error when you try to call an external RESTFull service through HTTPs:
Caused by: java.lang.NoClassDefFoundError: sun/security/ssl/HandshakeStateManager
at sun.security.ssl.Handshaker.init(Handshaker.java:282)
at sun.security.ssl.Handshaker.(Handshaker.java:242)
at sun.security.ssl.ClientHandshaker.(ClientHandshaker.java:160)
at sun.security.ssl.SSLSocketImpl.initHandshaker(SSLSocketImpl.java:1329)
at sun.security.ssl.SSLSocketImpl.doneConnect(SSLSocketImpl.java:690)
at sun.security.ssl.SSLSocketImpl.(SSLSocketImpl.java:569)
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:110)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:365)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
An easy fix is publishing the Glassfish image with a new jdk version, for instance:
The containers published on docker hub airhacks/glassfish:v5 and airhacks/glassfish:5.1.0 use openjdk version "1.8.0_121" generating the following error when you try to call an external RESTFull service through HTTPs:
Caused by: java.lang.NoClassDefFoundError: sun/security/ssl/HandshakeStateManager
at sun.security.ssl.Handshaker.init(Handshaker.java:282)
at sun.security.ssl.Handshaker.(Handshaker.java:242)
at sun.security.ssl.ClientHandshaker.(ClientHandshaker.java:160)
at sun.security.ssl.SSLSocketImpl.initHandshaker(SSLSocketImpl.java:1329)
at sun.security.ssl.SSLSocketImpl.doneConnect(SSLSocketImpl.java:690)
at sun.security.ssl.SSLSocketImpl.(SSLSocketImpl.java:569)
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:110)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:365)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
An easy fix is publishing the Glassfish image with a new jdk version, for instance:
FROM airhacks/java-s2i
ENV GLASSFISH_ARCHIVE glassfish5
ENV DOMAIN_NAME domain1
ENV INSTALL_DIR /opt
RUN useradd -b /opt -m -s /bin/sh -d ${INSTALL_DIR} serveradmin && echo serveradmin:serveradmin | chpasswd
RUN curl -o ${INSTALL_DIR}/${GLASSFISH_ARCHIVE}.zip -L http://mirrors.xmission.com/eclipse/glassfish/glassfish-5.1.0.zip \
&& unzip ${INSTALL_DIR}/${GLASSFISH_ARCHIVE}.zip -d ${INSTALL_DIR} \
&& rm ${INSTALL_DIR}/${GLASSFISH_ARCHIVE}.zip
&& chown -R serveradmin:serveradmin /opt
&& chmod -R a+rw /opt
ENV GLASSFISH_HOME ${INSTALL_DIR}/${GLASSFISH_ARCHIVE}/glassfish
ENV DEPLOYMENT_DIR ${GLASSFISH_HOME}/domains/domain1/autodeploy
WORKDIR ${GLASSFISH_HOME}/bin
USER serveradmin
EXPOSE 4848 8009 8080 8181
airhacks/java-s2i uses openjdk version "1.8.0_191" where HTTPs works fine.
The text was updated successfully, but these errors were encountered: