Java – sun. Not found security. ssl. SSLSessionImpl
•
Java
When I try to use okhttp or javax ws. rs.client. Client, the following error occurs
In sun security. Search in SSL package, no sslsessionimpl class
I use Mac OS 10.13 3(17D102)
java -version java version "1.8.0_162" Java(TM) SE Runtime Environment (build 1.8.0_162-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12,mixed mode)
And run my war on GlassFish 5.0
Build gradle
buildscript { ext.kotlin_version = '1.2.30' repositories { mavenCentral() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-noarg:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version" } } group 'invoice-administration-api' version '1.0-SNAPSHOT' apply plugin: 'idea' apply plugin: 'war' apply plugin: 'kotlin' apply plugin: 'kotlin-jpa' apply plugin: 'kotlin-allopen' repositories { mavenCentral() } dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compileOnly group: 'javax',name: 'javaee-api',version: '8.0' compile group: 'org.hibernate',name: 'hibernate-core',version: '5.2.13.Final' compile group: 'org.glassfish.jersey.media',name: 'jersey-media-json-jackson',version: '2.26' } allOpen { annotation('javax.ejb.Stateless') } compileKotlin { kotlinOptions.jvmTarget = "1.8" } compileTestKotlin { kotlinOptions.jvmTarget = "1.8" }
Solution
Editor: because this is the "right answer", Java 1.8 0-151 will lack a security patch I do not recommend downgrading to such an old java version
Please check the new version of payara project or GlassFish
–
Try to downgrade the Java version to Java 1.8 0-151. It should work
There is a problem in GlassFish 5 using java 8 161. An issue is created, but the nighttime version of this problem has not changed. I checked it yesterday (March 19)
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码