cameron_1 Posted January 7, 2015 Posted January 7, 2015 Hi All,I've just upgraded our test server to 6.0, and no the MS SQL Server 2005 Driver (com.microsoft.sqlserver.jdbc.SQLServerDriver) no longer works.Whenever you try to connect to the server it just returns this error - The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Server key".[/code]Anyone else experiencing this problem?This is running on SQL Server 2014. I think the JVM installed with jaspersoft may be contributing here (I loathe to play with it though, for fear of breaking things further), thats on version 1.6.0_18. Full stack trace is here - com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Server key".ClientConnectionId:2153df67-6305-42e4-ba3b-39c2dfee6b3batcom.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)atcom.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1668)atcom.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1323)atcom.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)atcom.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)atcom.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)at java.sql.DriverManager.getConnection(DriverManager.java:582)at java.sql.DriverManager.getConnection(DriverManager.java:185)atorg.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:48)atcom.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDriverManagerConnectionFactory.createConnection(JdbcDriverManagerConnectionFactory.java:36)atorg.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)atorg.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)atorg.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)atcom.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.testConnection(JdbcDataSourceService.java:84)atcom.jaspersoft.jasperserver.remote.connection.JdbcConnectionStrategy.createConnection(JdbcConnectionStrategy.java:73)atcom.jaspersoft.jasperserver.remote.connection.JdbcConnectionStrategy.createConnection(JdbcConnectionStrategy.java:44)atcom.jaspersoft.jasperserver.remote.connection.ConnectionsManager.createConnection(ConnectionsManager.java:71)atcom.jaspersoft.jasperserver.jaxrs.connection.ConnectionsJaxrsService.createConnection(ConnectionsJaxrsService.java:84)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)atcom.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)atcom.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)atcom.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)atcom.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)atcom.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)atcom.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)atcom.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)atcom.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483)atcom.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414)atcom.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)atcom.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)atcom.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)atcom.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)atcom.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)atorg.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)atorg.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)atorg.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.jaspersoft.jasperserver.war.StaticFilesCacheControlFilter.doFilter(StaticFilesCacheControlFilter.java:163)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:399)atorg.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)atorg.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.api.metadata.user.service.impl.MetadataAuthenticationProcessingFilter.doFilter(MetadataAuthenticationProcessingFilter.java:103)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.war.util.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:94)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.multipleTenancy.MTBasicProcessingFilter.doFilterHttp(MTBasicProcessingFilter.java:179)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:210)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.war.NullFilter.doFilterHttp(NullFilter.java:44)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:210)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.api.logging.filter.BasicLoggingFilter.doFilter(BasicLoggingFilter.java:53)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.api.security.JSCsrfGuardFilter.doFilter(JSCsrfGuardFilter.java:83)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.api.security.WebAppSecurityFilter.doFilter(WebAppSecurityFilter.java:80)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.api.security.encryption.EncryptionFilter.doFilter(EncryptionFilter.java:150)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.ji.license.JILicenseFilter.doFilter(JILicenseFilter.java:85)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:188)atorg.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:104)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.jaspersoft.jasperserver.war.util.SessionDecoratorFilter.doFilter(SessionDecoratorFilter.java:63)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.jaspersoft.jasperserver.war.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:67)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.jaspersoft.jasperserver.war.P3PFilter.doFilter(P3PFilter.java:43)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)atorg.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)atorg.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)atorg.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)at java.lang.Thread.run(Thread.java:619)Caused by: javax.net.ssl.SSLException: Server keyatcom.sun.net.ssl.internal.ssl.Handshaker.throwSSLException(Handshaker.java:850)atcom.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:187)atcom.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516)atcom.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1112)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1139)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)atcom.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1618)... 123 moreCaused by: java.security.spec.InvalidKeySpecException: key spec notrecognisedatorg.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi.engineGeneratePublic(UnknownSource)atorg.bouncycastle.jcajce.provider.asymmetric.ec.KeyFactorySpi.engineGeneratePublic(UnknownSource)at java.security.KeyFactory.generatePublic(KeyFactory.java:304)atcom.sun.net.ssl.internal.ssl.HandshakeMessage$ECDH_ServerKeyExchange.(HandshakeMessage.java:904)at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:183)... 130 more [/code]
sbyrne Posted April 1, 2015 Posted April 1, 2015 I got the same InvalidKeySpecException doing something else. The workaround is to use Oracle's JRE 1.7.0 instead of OpenJDK.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now