找不到sun.security.ssl.SSLSessionImpl [英] sun.security.ssl.SSLSessionImpl not found
问题描述
当我尝试使用okhttp
或javax.ws.rs.client.Client
时,发生以下错误
When I try to use okhttp
or javax.ws.rs.client.Client
the following error occur
java.lang.NoSuchMethodError: sun.security.ssl.SSLSessionImpl.(Lsun/security/ssl/ProtocolVersion; Lsun/security/ssl/CipherSuite; Ljava/util/Collection; Lsun/security/ssl/SessionId; Ljava/lang/String; I)V >
java.lang.NoSuchMethodError: sun.security.ssl.SSLSessionImpl.(Lsun/security/ssl/ProtocolVersion;Lsun/security/ssl/CipherSuite;Ljava/util/Collection;Lsun/security/ssl/SessionId;Ljava/lang/String;I)V
在sun.security.ssl包中搜索,没有SSLSessionImpl类
Searching in the sun.security.ssl package, there is no SSLSessionImpl class
我使用Mac OS 10.13.3(17D102)
Im using 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)
在Glassfish 5.0上发动战争
And running 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"
}
推荐答案
由于这是正确答案",因此Java 1.8.0-151将可能缺少安全补丁.我不建议降级到这样的旧Java版本.
since this is the "correct answer" and Java 1.8.0-151 will potentialy lack security patches. I can't recommend to downgrade to a such an old Java version.
请查看Payara项目或Glassfish的新版本.
Please take a look at Payara project or new releases of Glassfish.
-
尝试将Java版本降级为Java 1.8.0-151.应该可以.
Try to downgrade the Java version to Java 1.8.0-151. It should work.
使用Java 8 161的glassfish 5中存在一个问题,创建了问题 ,但有关此问题的夜间版本没有任何变化,我昨天(3月19日)检查了此情况.
There's an issue in glassfish 5 with Java 8 161, there's an issue created, but no changes in nightly builds regarding the issue, I checked yesterday (19th march).
这篇关于找不到sun.security.ssl.SSLSessionImpl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!