When I try to use okhttp or javax.ws.rs.client.Client the following error occur
java.lang.NoSuchMethodError: sun.security.
The above Error could result to this displaying in your browser:
The connection was reset The connection to the server was reset while the page was loading. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer’s network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
SOLUTION Download: http://central.maven.org/maven2/org/glassfish/grizzly/grizzly-npn-bootstrap/1.8.1/grizzly-npn-bootstrap-1.8.1.jar and Replace your galssfish/payara grizzly-npn-bootstrap.jar.
mv grizzly-npn-bootstrap-1.8.1.jar glassfish5/glassfish/modules/endorsed/grizzly-npn-bootstrap.jar