我从托管在 tomcat (RHEL) 上的 Spring Hibernate Application 连接到 SQL Server 2008 时遇到问题
我的豆子:
<beans:bean id="sDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<beans:property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<beans:property name="url" value="jdbc:sqlserver://abc.com:1433;databaseName=ABC;" />
<beans:property name="username" value="AAAAAAA" />
<beans:property name="password" value="XXXXXXXX" />
</beans:bean>
最初我收到此错误:
[04-18-2016 17:45:01,837-0400] [Line: ?] DEBUG [com.services.hibernate.SessionHandler] [Entering Method getSession()]
[04-18-2016 17:45:01,882-0400] [Line: ?] DEBUG [com.services.hibernate.SessionHandler] [Exiting Method getSession()]
[04-18-2016 17:45:01,901-0400] [Line: ?] ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] [The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SSLv3 SSLContext not available".]
[04-18-2016 17:45:01,902-0400] [Line: ?] DEBUG [com.services.hibernate.SessionHandler] [Entering Method returnSession()]
[04-18-2016 17:45:01,903-0400] [Line: ?] DEBUG [com.services.hibernate.SessionHandler] [Exiting Method returnSession()]
然后我遇到了这个问题,并进行了更改-Dcom.ibm.jsse2.disableSSLv3=false
然后我得到了这个错误:
[04-18-2016 17:47:45,728-0400] [Line: ?] DEBUG [com.services.hibernate.SessionHandler] [Entering Method getSession()]
[04-18-2016 17:47:45,815-0400] [Line: ?] DEBUG [com.services.hibernate.SessionHandler] [Exiting Method getSession()]
[04-18-2016 17:47:45,845-0400] [Line: ?] ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] [The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "No appropriate protocol (protocol is disabled or cipher suites are inappropriate)".]
[04-18-2016 17:47:45,847-0400] [Line: ?] DEBUG [com.services.hibernate.SessionHandler] [Entering Method returnSession()]
[04-18-2016 17:47:45,848-0400] [Line: ?] DEBUG [com.services.hibernate.SessionHandler] [Exiting Method returnSession()]
该代码完全正常运行,因为它在我的本地环境中返回结果,但是当我将它部署在云(RHEL V6)中时,我收到了这些错误。
请帮帮我。我完全被困在这一点上。
我需要在 Linux 服务器上安装一些东西吗?