TheInfiniteKind/appbundler

Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext

Closed this issue · 3 comments

ijabz commented

Gettig this issue when creating bundle using OpenJdk 11 JRE

java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at java.base/java.security.Provider$Service.getImplClass(Provider.java:1848)
at java.base/java.security.Provider$Service.newInstance(Provider.java:1824)
at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at java.base/javax.net.ssl.SSLContext.getInstance(SSLContext.java:168)
at org.apache.http.ssl.SSLContextBuilder.build(SSLContextBuilder.java:269)

I had no problems when was using Java 8. If I just run java -jar against the code using the installed openjdk rather than one embedded by appbundler it works

There is more information at https://stackoverflow.com/questions/61185934/apache-httpclient-failing-with-java-11-on-macos and alos more details about my build process at https://stackoverflow.com/questions/58548736/notarize-existing-java-application-for-macos-catalina

ijabz commented

Made some progress. The JRE installed on MacOS contains a conf folder, when the JRE is added to my bundle using InfiniteKinds appbundler it does not have a conf folder. After installing the built bundle if I manually copy the conf folder from the installed JRE to the Home folder of the java plugin inside my bundle everythiing works.

So is there a way to make appbundler include the conf folder as part of the build, anyone understand why this is necessary ?

ijabz commented

Related issue docker-library/openjdk#101 but this was way back !

ijabz commented

Just rebuilt appbundler and it worked, so i guess you fixed this already at some point, okay thx.