When I try to use okhttp
or javax.ws.rs.client.Client
the following error occur
java.lang.NoSuchMethodError: sun.security.
Maybe a little bit more elegant is to use the existing fix done in the npn-grizzly jar:
mkdir -p scratch/glassfish5/glassfish/modules/endorsed && cd scratch
wget http://download.oracle.com/glassfish/5.0.1/nightly/glassfish-5.0.1-b02-12_03_2018.zip
wget http://central.maven.org/maven2/org/glassfish/grizzly/grizzly-npn-bootstrap/1.8.1/grizzly-npn-bootstrap-1.8.1.jar
mv grizzly-npn-bootstrap-1.8.1.jar glassfish5/glassfish/modules/endorsed/grizzly-npn-bootstrap.jar
jar uvf glassfish-5.0.1-b02-12_03_2018.zip glassfish5/glassfish/modules/endorsed/grizzly-npn-bootstrap.jar
echo "you have a patched archive for runnig with Java 8 patchlevel 191"
HTH