Glassfish:春季启动错误 [英] Glassfish: Spring boot error
问题描述
我在Glassfish 5.0中部署了一个Spring Boot应用程序.尝试使用Spring Security基本身份验证在此应用程序中访问REST服务时,出现以下错误:
I have a spring boot application deployed in Glassfish 5.0. When trying to access a REST service in this application with spring security basic auth, I'm getting the below error:
java.lang.NoSuchMethodError:sun.security.ssl.SessionId.checkLength(Lsun/security/ssl/ProtocolVersion;)V
java.lang.NoSuchMethodError: sun.security.ssl.SessionId.checkLength(Lsun/security/ssl/ProtocolVersion;)V
该应用程序在Tomcat服务器中正常运行.仅在glassfish服务器中会发生此错误.
我的JAVA_HOME
已设置为jdk1.8.0_31
.
可能是什么问题?
The application works fine in Tomcat server. This error is occurring only in glassfish server.
My JAVA_HOME
is already set to jdk1.8.0_31
.
What could be the issue ?
以下是我尝试使用邮递员访问服务时的错误:
Below is the error when I'm trying to access the service using postman:
推荐答案
包含方法sun.security.ssl.SessionId.checkLength
的jar文件可能未部署在glass fish服务器中.该程序包有望放入玻璃鱼服务器中.因此,找到在其中声明了sun.security.ssl.SessionId
类的包,然后将该包的jar文件部署在glass fish服务器中.该软件包包含在您的库列表中,但该库未部署在glass fish服务器中.
The jar file that contains the method sun.security.ssl.SessionId.checkLength
may not be deployed in glass fish server. The package is expecting into the glass fish server. So find the package in which the sun.security.ssl.SessionId
class is declared and and deploy the jar file of the package in the glass fish server. the package contains in your library list but the library is not deployed in glass fish server.
sun.security.ssl.SessionId class is a part of jdk8. So make sure your glassfish server using jdk8. it may not work in jdk7.
这篇关于Glassfish:春季启动错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!