jersey icon indicating copy to clipboard operation
jersey copied to clipboard

Delayed synchronization SSL context initialization in HttpUrlConnector affects functionality

Open 2368001770 opened this issue 4 years ago • 5 comments

Is there a bug with jersey2.34?I found that “DEFAULT_SSL_SOCKET_FACTORY.get()” and "HttpsURLConnection.getDefaultSSLSocketFactory()" are not always equal. image

2368001770 avatar Jun 29 '21 13:06 2368001770

There is #4757 that requests the context to be initialized lazily. There is #4566 that requests the context to be initialized statically. There is an issue with the native image that requests the context to be initialized lazily.

There seem to be a lot of contra requirements.

jansupol avatar Jul 27 '21 18:07 jansupol

error message for static (not lazy) default SSL socket factory initialization when used with GraalVM native image:

com.oracle.svm.core.util.UserError$UserException: No instances of sun.security.provider.NativePRNG are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=sun.security.provider.NativePRNG.

senivam avatar Aug 12 '21 13:08 senivam

Related: #3293

jansupol avatar Aug 31 '21 20:08 jansupol

#4332

jansupol avatar Jun 09 '23 10:06 jansupol

This issue is fixed in 2.41 (see PR: #5359)

dtbaum avatar Oct 29 '23 12:10 dtbaum