1 2 Previous Next 19 Replies Latest reply on Dec 14, 2004 2:45 AM by beyarecords

    PostgreSQL + SSL - sun.security.validator.ValidatorException

    beyarecords Novice

      Hi,
      in error I forgot to include the complete stack trace related to my very last post:

      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.)
       at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
       at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
       at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
       at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
       at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
       at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:476)
       at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:416)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
       at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy8.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:416)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
       at org.jboss.Main.boot(Main.java:151)
       at org.jboss.Main$1.run(Main.java:405)
       at java.lang.Thread.run(Thread.java:552)
      Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
       at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
       at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:63)
       at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
       at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
       at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
       at org.postgresql.Driver.connect(Driver.java:183)
       at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:151)
       ... 106 more
      Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
       at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
       at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
       at org.postgresql.core.PGStream.flush(PGStream.java:486)
       at org.postgresql.core.v3.ConnectionFactoryImpl.sendStartupPacket(ConnectionFactoryImpl.java:243)
       at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:91)
       ... 112 more
      Caused by: sun.security.validator.ValidatorException: No trusted certificate found
       at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
       at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
       at sun.security.validator.Validator.validate(Validator.java:202)
       at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA12275)
       at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA12275)
       ... 124 more
      11:05:26,464 WARN [SettingsFactory] Could not obtain connection metadata
      org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.))
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
       at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
       at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
       at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
       at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
       at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:476)
       at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:416)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
       at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy8.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:416)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
       at org.jboss.Main.boot(Main.java:151)
       at org.jboss.Main$1.run(Main.java:405)
       at java.lang.Thread.run(Thread.java:552)
      Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.)
       at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
       ... 98 more
      Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
       at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
       at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:63)
       at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
       at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
       at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
       at org.postgresql.Driver.connect(Driver.java:183)
       at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:151)
       ... 106 more
      Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
       at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
       at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
       at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
       at org.postgresql.core.PGStream.flush(PGStream.java:486)
       at org.postgresql.core.v3.ConnectionFactoryImpl.sendStartupPacket(ConnectionFactoryImpl.java:243)
       at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:91)
       ... 112 more
      Caused by: sun.security.validator.ValidatorException: No trusted certificate found
       at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
       at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
       at sun.security.validator.Validator.validate(Validator.java:202)
       at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA12275)
       at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA12275)
       ... 124 more
      


      many thanks


      Andrew

        • 1. Re: PostgreSQL + SSL - sun.security.validator.ValidatorExcep
          Scott Stark Master

          Its not jboss that is looking for the keystore, its the jdbc driver. If they are using jsse then the standard jsse system properties apply. See the jsse guide in the jdk javadocs.

          • 2. Re: PostgreSQL + SSL - sun.security.validator.ValidatorExcep
            beyarecords Novice

            Hi Scott,
            thanks for your reply. From reading various sources of documentation it is clear that I need to implement the following:

            java -Djavax.net.ssl.trustStore=/library/java/home/lib/security/cacert application

            Now, my confusion is this:

            1. As I am running an a web application and jboss handles/controls the connection in my postgres-ds.xml file and the only classes I have access to are those in my hibernate.har file, none of which have a main(), where do I specify -Djavax.net.ssl.trustStore=/library/java/home/lib/security/cacert? Can I specify it in my postgres-ds.xml file, which to me would be the logical place to do it? If so, how?

            regards

            Andrew

            • 3. Re: PostgreSQL + SSL - sun.security.validator.ValidatorExcep
              beyarecords Novice

              Hi,
              further to my earlier post, I downloaded the source to my driver located at:

              http://jdbc.postgresql.org/download.html

              the source in question being pg80b1.308.src.tar.gz

              located within /doc/pgjdbc.xml I came across the following snippet which backsup earlier comment about using postgres-ds.xml to specify the location of the trustStore:

               <para>
               In addition to the standard connection parameters the driver supports a
               number of additional properties which can be used to specify additional
               driver behavior specific to <productname>PostgreSQL</productname>. These
               properties may be specified in either the connection
               <acronym>URL</acronym> or an additional
               <classname>Properties</classname> object parameter to
               <function>DriverManager.getConnection</function>. The following
               examples illustrate the use of both methods to establish a SSL
               connection.
              
              <programlisting>
              String url = "jdbc:postgresql://localhost/test";
              Properties props = new Properties();
              props.setProperty("user","fred");
              props.setProperty("password","secret");
              props.setProperty("ssl","true");
              Connection conn = DriverManager.getConnection(url, props);
              </programlisting>
              


              So, refering back to my postgres-ds.xml file for a second while keeping the above in mind:

              <datasources>
               <local-tx-datasource>
               <jndi-name>PostgresDS</jndi-name>
               <connection-url>jdbc:postgresql://localhost:5432/beyarecords?ssl=true</connection-url>
               <driver-class>org.postgresql.Driver</driver-class>
               <user-name>postgres</user-name>
               <password>postgres</password>
               <max-pool-size>10</max-pool-size>
              
               <metadata>
               <type-mapping>PostgreSQL 7.2</type-mapping>
               </metadata>
               </local-tx-datasource>
              </datasources>
              


              I need to add the additional parameters:

              System.setProperty("javax.net.ssl.trustStore", cacert);
              System.setProperty("javax.net.ssl.trustStorePassword","changeit");

              which in my postgres-ds.xml would be represented as:

              <javax.net.ssl.trustStore>/library/java/home/lib/security/cacert</javax.net.ssl.trustStore>
              <javax.net.ssl.trustStorePassword>changeit</javax.net.ssl.trustStorePassword>
              


              or something like that. can this be done?

              many thanks

              Andrew

              • 5. Re: PostgreSQL + SSL - sun.security.validator.ValidatorExcep
                beyarecords Novice

                Hi Scott,

                I located run.conf in /library/jboss-4.0.0/bin/. I added the following to JAVA_OPTS:

                JAVA_OPTS="..... -Djavax.net.ssl.trustStore=/library/java/home/lib/security/cacert -Djavax.net.ssl.trustStorePassword=changeit"
                


                So now when I do ./run.sh I get confirmation of the above amendment in the Jboss output:

                =========================================================================
                 JBoss Bootstrap Environment
                
                 JBOSS_HOME: /library/jboss-4.0.0
                
                 JAVA: java
                
                JAVA_OPTS: -server -Xms128m -Xmx128m -Djavax.net.ssl.trustStore=/library/java/home/lib/security/cacert -Djavax.net.ssl.trustStorePassword=changeit -Dprogram.name=run.sh
                
                
                
                 CLASSPATH: /library/jboss-4.0.0/bin/run.jar:/lib/tools.jar
                =========================================================================
                


                But still after all that I still get the following:

                16:54:37,396 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
                org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.)
                 at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
                 at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
                 at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
                 at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
                 at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
                 at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
                 at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
                 at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
                 at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
                 at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
                 at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
                 at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
                 at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
                 at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:476)
                 at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                 at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                 at $Proxy0.start(Unknown Source)
                 at org.jboss.system.ServiceController.start(ServiceController.java:416)
                 at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy4.start(Unknown Source)
                 at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                 at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy8.deploy(Unknown Source)
                 at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
                 at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
                 at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
                 at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                 at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                 at $Proxy0.start(Unknown Source)
                 at org.jboss.system.ServiceController.start(ServiceController.java:416)
                 at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy4.start(Unknown Source)
                 at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy5.deploy(Unknown Source)
                 at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
                 at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
                 at org.jboss.Main.boot(Main.java:151)
                 at org.jboss.Main$1.run(Main.java:405)
                 at java.lang.Thread.run(Thread.java:552)
                Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
                 at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
                 at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:63)
                 at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
                 at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
                 at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
                 at org.postgresql.Driver.connect(Driver.java:183)
                 at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:151)
                 ... 106 more
                Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
                 at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
                 at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
                 at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
                 at org.postgresql.core.PGStream.flush(PGStream.java:486)
                 at org.postgresql.core.v3.ConnectionFactoryImpl.sendStartupPacket(ConnectionFactoryImpl.java:243)
                 at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:91)
                 ... 112 more
                Caused by: sun.security.validator.ValidatorException: No trusted certificate found
                 at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
                 at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
                 at sun.security.validator.Validator.validate(Validator.java:202)
                 at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA12275)
                 ... 124 more
                16:54:37,420 WARN [SettingsFactory] Could not obtain connection metadata
                org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.))
                 at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
                 at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
                 at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
                 at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
                 at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
                 at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:476)
                 at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                 at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                 at $Proxy0.start(Unknown Source)
                 at org.jboss.system.ServiceController.start(ServiceController.java:416)
                 at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy4.start(Unknown Source)
                 at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                 at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy8.deploy(Unknown Source)
                 at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
                 at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
                 at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
                 at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                 at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                 at $Proxy0.start(Unknown Source)
                 at org.jboss.system.ServiceController.start(ServiceController.java:416)
                 at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy4.start(Unknown Source)
                 at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy5.deploy(Unknown Source)
                 at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
                 at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
                 at org.jboss.Main.boot(Main.java:151)
                 at org.jboss.Main$1.run(Main.java:405)
                 at java.lang.Thread.run(Thread.java:552)
                Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.)
                 at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
                 at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
                 at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
                 at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
                 at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
                 at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
                 at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
                 at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
                 at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
                 ... 98 more
                Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
                 at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
                 at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:63)
                 at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
                 at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
                 at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
                 at org.postgresql.Driver.connect(Driver.java:183)
                 at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:151)
                 ... 106 more
                Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
                 at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
                 at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
                 at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
                 at org.postgresql.core.PGStream.flush(PGStream.java:486)
                 at org.postgresql.core.v3.ConnectionFactoryImpl.sendStartupPacket(ConnectionFactoryImpl.java:243)
                 at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:91)
                 ... 112 more
                Caused by: sun.security.validator.ValidatorException: No trusted certificate found
                 at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
                 at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
                 at sun.security.validator.Validator.validate(Validator.java:202)
                 at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA12275)
                 at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA12275)
                 ... 124 more
                


                Any ideas?

                regards


                Andew

                • 6. Re: PostgreSQL + SSL - sun.security.validator.ValidatorExcep
                  beyarecords Novice

                  Scott,
                  I implemented your recommendations in the properties-service.xml file which I placed in /server/default/deploy/:

                   <attribute name="Properties">
                   javax.net.ssl.trustStore = "/library/java/home/lib/security/cacert"
                   javax.net.ssl.trustStorePassword = "changeit"
                   </attribute>
                  


                  I tried the values using both quotes and no quotes, and on both times the result was the same as mentioned in my earlier post. I even tried it with the names begining with -D, and again the result was same.

                  Any further ideas? I think that getting hold of a self-generated certificate, which is what i'm using, that is known to work will have to be the next port of call.

                  regards

                  Andrew

                  • 7. Re: PostgreSQL + SSL - sun.security.validator.ValidatorExcep
                    Scott Stark Master

                    That truststore is automatically used by the jsse layer so this configuration would not be adding anything new. At this point you down to debugging the jdbc driver ssl configuration and how it uses jsse as I have never used postgres.

                    • 8. Re: PostgreSQL + SSL - sun.security.validator.ValidatorExcep
                      beyarecords Novice

                      Ok,
                      I'm nearly there but not yet.....

                      I can ascertain what is in my keystore by doing:

                      $ keytool -list

                      Enter keystore password: mypassword

                      Keystore type: jks
                      Keystore provider: SUN
                      
                      Your keystore contains 1 entry
                      
                      beyarecords.com, Dec 7, 2004, keyEntry,
                      Certificate fingerprint (MD5): 32:44:5B:78:85:BA:BA:96:C1:CF:DF:A2:6A:0E:78:CB
                      


                      I specify properties in jboss like so:

                      javax.net.ssl.keyStore=/library/java/home/lib/security/cacerts
                      javax.net.ssl.keyStorePassword=changeit
                      javax.net.ssl.keyStoreType= JKS
                      


                      The error message I get back is:

                      sun.security.validator.ValidatorException: No trusted certificate found
                      


                      If I say :

                      javax.net.ssl.keyStore=/library/java/home/lib/security/cacerts/beyarecords.com
                      javax.net.ssl.keyStorePassword=mypassword
                      


                      I get the following error:

                      java.net.SocketException: Default SSL context init failed: null
                      


                      I am of the understanding that once a certificate has been imported into the keystore and associated via an alias(beyarecords.com) with a key (32:44:5B:78:85:BA:BA:96:C1:CF:DF:A2:6A:0E:78:CB) that it is then trusted?
                      What am I missing here? Would it be helpfull if I posted the certificate just to verify from someone that the certificate is working properly?

                      regards

                      Andrew

                      • 9. Re: PostgreSQL + SSL - sun.security.validator.ValidatorExcep
                        beyarecords Novice

                        Hi,
                        in error I forgot to include the complete stack trace related to my very last post:

                        org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.)
                         at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
                         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
                         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
                         at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
                         at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
                         at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
                         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
                         at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
                         at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
                         at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
                         at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
                         at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
                         at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
                         at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:476)
                         at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
                         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                         at $Proxy0.start(Unknown Source)
                         at org.jboss.system.ServiceController.start(ServiceController.java:416)
                         at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                         at $Proxy4.start(Unknown Source)
                         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
                         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                         at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                         at $Proxy8.deploy(Unknown Source)
                         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
                         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
                         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
                         at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
                         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                         at $Proxy0.start(Unknown Source)
                         at org.jboss.system.ServiceController.start(ServiceController.java:416)
                         at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                         at $Proxy4.start(Unknown Source)
                         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
                         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                         at $Proxy5.deploy(Unknown Source)
                         at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
                         at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
                         at org.jboss.Main.boot(Main.java:151)
                         at org.jboss.Main$1.run(Main.java:405)
                         at java.lang.Thread.run(Thread.java:552)
                        Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
                         at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
                         at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:63)
                         at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
                         at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
                         at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
                         at org.postgresql.Driver.connect(Driver.java:183)
                         at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:151)
                         ... 106 more
                        Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
                         at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
                         at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
                         at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
                         at org.postgresql.core.PGStream.flush(PGStream.java:486)
                         at org.postgresql.core.v3.ConnectionFactoryImpl.sendStartupPacket(ConnectionFactoryImpl.java:243)
                         at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:91)
                         ... 112 more
                        Caused by: sun.security.validator.ValidatorException: No trusted certificate found
                         at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
                         at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
                         at sun.security.validator.Validator.validate(Validator.java:202)
                         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA12275)
                         ... 124 more
                        11:05:26,464 WARN [SettingsFactory] Could not obtain connection metadata
                        org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.))
                         at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
                         at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
                         at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
                         at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
                         at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
                         at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:476)
                         at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
                         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                         at $Proxy0.start(Unknown Source)
                         at org.jboss.system.ServiceController.start(ServiceController.java:416)
                         at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                         at $Proxy4.start(Unknown Source)
                         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
                         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                         at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                         at $Proxy8.deploy(Unknown Source)
                         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
                         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
                         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
                         at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
                         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                         at $Proxy0.start(Unknown Source)
                         at org.jboss.system.ServiceController.start(ServiceController.java:416)
                         at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                         at $Proxy4.start(Unknown Source)
                         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
                         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:324)
                         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                         at $Proxy5.deploy(Unknown Source)
                         at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
                         at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
                         at org.jboss.Main.boot(Main.java:151)
                         at org.jboss.Main$1.run(Main.java:405)
                         at java.lang.Thread.run(Thread.java:552)
                        Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.)
                         at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
                         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
                         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
                         at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
                         at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
                         at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
                         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
                         at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
                         at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
                         ... 98 more
                        Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
                         at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
                         at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:63)
                         at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
                         at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
                         at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
                         at org.postgresql.Driver.connect(Driver.java:183)
                         at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:151)
                         ... 106 more
                        Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
                         at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
                         at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
                         at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
                         at org.postgresql.core.PGStream.flush(PGStream.java:486)
                         at org.postgresql.core.v3.ConnectionFactoryImpl.sendStartupPacket(ConnectionFactoryImpl.java:243)
                         at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:91)
                         ... 112 more
                        Caused by: sun.security.validator.ValidatorException: No trusted certificate found
                         at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
                         at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
                         at sun.security.validator.Validator.validate(Validator.java:202)
                         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA12275)
                         at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA12275)
                         ... 124 more
                        


                        many thanks


                        Andrew

                        • 10. Re: PostgreSQL + SSL - peer did not return a certificaten
                          beyarecords Novice

                          Ok,
                          i'm on the final run of the race! Jboss is shaking hands with postgreSQL via SSL but needs to verify itself to postgreSQL by returning a certifcate. Does anyone know where in Jboss I need to place the certifcate and how I go about specifying the location of the certificate? in other words, where is the .keystore located in jboss???

                          The complete stack trace is as follows:

                          18:14:03,990 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
                          org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.)
                           at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
                           at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
                           at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
                           at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
                           at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
                           at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
                           at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
                           at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
                           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
                           at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
                           at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
                           at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
                           at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
                           at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:476)
                           at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
                           at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                           at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                           at $Proxy0.start(Unknown Source)
                           at org.jboss.system.ServiceController.start(ServiceController.java:416)
                           at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                           at $Proxy4.start(Unknown Source)
                           at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
                           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                           at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                           at $Proxy8.deploy(Unknown Source)
                           at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
                           at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
                           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
                           at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
                           at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                           at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                           at $Proxy0.start(Unknown Source)
                           at org.jboss.system.ServiceController.start(ServiceController.java:416)
                           at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                           at $Proxy4.start(Unknown Source)
                           at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
                           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                           at $Proxy5.deploy(Unknown Source)
                           at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
                           at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
                           at org.jboss.Main.boot(Main.java:151)
                           at org.jboss.Main$1.run(Main.java:405)
                           at java.lang.Thread.run(Thread.java:552)
                          Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
                           at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
                           at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:63)
                           at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
                           at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
                           at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
                           at org.postgresql.Driver.connect(Driver.java:183)
                           at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:151)
                           ... 106 more
                          Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
                           at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SunJSSE_az.j(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
                           at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
                           at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
                           at org.postgresql.core.PGStream.flush(PGStream.java:486)
                           at org.postgresql.core.v3.ConnectionFactoryImpl.sendStartupPacket(ConnectionFactoryImpl.java:243)
                           at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:91)
                           ... 112 more
                          18:14:04,023 WARN [SettingsFactory] Could not obtain connection metadata
                          org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.))
                           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
                           at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
                           at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
                           at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
                           at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
                           at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:476)
                           at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
                           at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                           at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                           at $Proxy0.start(Unknown Source)
                           at org.jboss.system.ServiceController.start(ServiceController.java:416)
                           at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                           at $Proxy4.start(Unknown Source)
                           at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
                           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                           at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                           at $Proxy8.deploy(Unknown Source)
                           at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
                           at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
                           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
                           at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
                           at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                           at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                           at $Proxy0.start(Unknown Source)
                           at org.jboss.system.ServiceController.start(ServiceController.java:416)
                           at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                           at $Proxy4.start(Unknown Source)
                           at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
                           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:324)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                           at $Proxy5.deploy(Unknown Source)
                           at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
                           at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
                           at org.jboss.Main.boot(Main.java:151)
                           at org.jboss.Main$1.run(Main.java:405)
                           at java.lang.Thread.run(Thread.java:552)
                          Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.)
                           at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
                           at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
                           at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
                           at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
                           at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
                           at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
                           at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
                           at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
                           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
                           ... 98 more
                          Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
                           at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
                           at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:63)
                           at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
                           at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
                           at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
                           at org.postgresql.Driver.connect(Driver.java:183)
                           at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:151)
                           ... 106 more
                          Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
                           at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SunJSSE_az.j(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                           at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
                           at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
                           at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
                           at org.postgresql.core.PGStream.flush(PGStream.java:486)
                           at org.postgresql.core.v3.ConnectionFactoryImpl.sendStartupPacket(ConnectionFactoryImpl.java:243)
                           at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:91)
                           ... 112 more
                          


                          regards

                          Andrew

                          • 11. Re: PostgreSQL + SSL - peer did not return a certificaten
                            beyarecords Novice

                            Ok,
                            i'm on the final run of the race! Jboss is shaking hands with postgreSQL via SSL but needs to verify itself to postgreSQL by returning a certifcate. Does anyone know where in Jboss I need to place the certifcate and how I go about specifying the location of the certificate? in other words, where is the .keystore located in jboss???

                            The complete stack trace is as follows:

                            18:14:03,990 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
                            org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.)
                             at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
                             at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
                             at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
                             at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
                             at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
                             at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
                             at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
                             at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
                             at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
                             at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
                             at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
                             at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
                             at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
                             at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:476)
                             at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                             at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                             at $Proxy0.start(Unknown Source)
                             at org.jboss.system.ServiceController.start(ServiceController.java:416)
                             at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                             at $Proxy4.start(Unknown Source)
                             at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                             at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                             at $Proxy8.deploy(Unknown Source)
                             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
                             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
                             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
                             at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                             at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                             at $Proxy0.start(Unknown Source)
                             at org.jboss.system.ServiceController.start(ServiceController.java:416)
                             at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                             at $Proxy4.start(Unknown Source)
                             at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
                             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                             at $Proxy5.deploy(Unknown Source)
                             at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
                             at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
                             at org.jboss.Main.boot(Main.java:151)
                             at org.jboss.Main$1.run(Main.java:405)
                             at java.lang.Thread.run(Thread.java:552)
                            Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
                             at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
                             at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:63)
                             at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
                             at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
                             at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
                             at org.postgresql.Driver.connect(Driver.java:183)
                             at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:151)
                             ... 106 more
                            Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
                             at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SunJSSE_az.j(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
                             at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
                             at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
                             at org.postgresql.core.PGStream.flush(PGStream.java:486)
                             at org.postgresql.core.v3.ConnectionFactoryImpl.sendStartupPacket(ConnectionFactoryImpl.java:243)
                             at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:91)
                             ... 112 more
                            18:14:04,023 WARN [SettingsFactory] Could not obtain connection metadata
                            org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.))
                             at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
                             at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
                             at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
                             at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
                             at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
                             at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:476)
                             at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                             at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                             at $Proxy0.start(Unknown Source)
                             at org.jboss.system.ServiceController.start(ServiceController.java:416)
                             at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                             at $Proxy4.start(Unknown Source)
                             at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                             at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                             at $Proxy8.deploy(Unknown Source)
                             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
                             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
                             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
                             at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
                             at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
                             at $Proxy0.start(Unknown Source)
                             at org.jboss.system.ServiceController.start(ServiceController.java:416)
                             at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                             at $Proxy4.start(Unknown Source)
                             at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
                             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:324)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                             at $Proxy5.deploy(Unknown Source)
                             at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
                             at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
                             at org.jboss.Main.boot(Main.java:151)
                             at org.jboss.Main$1.run(Main.java:405)
                             at java.lang.Thread.run(Thread.java:552)
                            Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: The connection attempt failed.)
                             at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
                             at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
                             at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
                             at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
                             at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
                             at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
                             at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
                             at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
                             at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
                             ... 98 more
                            Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
                             at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
                             at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:63)
                             at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
                             at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
                             at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
                             at org.postgresql.Driver.connect(Driver.java:183)
                             at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:151)
                             ... 106 more
                            Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
                             at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SunJSSE_az.j(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
                             at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
                             at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
                             at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
                             at org.postgresql.core.PGStream.flush(PGStream.java:486)
                             at org.postgresql.core.v3.ConnectionFactoryImpl.sendStartupPacket(ConnectionFactoryImpl.java:243)
                             at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:91)
                             ... 112 more
                            


                            regards

                            Andrew

                            • 12. Re: PostgreSQL + SSL - sun.security.validator.ValidatorExcep
                              beyarecords Novice

                              Hi,
                              ok I have managed to get half way with this issue. So far I have:

                              (1.) created a self trusted cert (server.crt.der) and imported it into /library/java/home/lib/security/cacerts

                              (2.) copied server.crt and server.key files into /usr/pgsql/data

                              (3.) restart jboss

                              The sum result of this is that handshaking between jboss and postgresql takes place, but the ssl link is unvalidated because no root files are placed in (2.)

                              I then place root.(crt|key) files into (1.) and then do (3.). The sum result of this is the following message:

                              could not accept SSL connection: peer did not return a certificate

                              So postgreSQL goes to shake hands with Jboss but can't because Jboss can't identify itself to postgreSQL with an appropriate certificate.

                              Does anyone, who has done this process themselves, know where I need to place the return certificate so that Jboss can identify itself to postgreSQL, and is the certificate I need to identify Jboss a copy of server.crt.der(certificate)?

                              regards

                              Andrew

                              • 13. Re: PostgreSQL + SSL - sun.security.validator.ValidatorExcep
                                beyarecords Novice

                                Ok,
                                for those interested..... the solution is:

                                27.13. SSL Support (postgresql docs)
                                'If the server demands a client certificate, libpq will send the certificate stored in file .postgresql/postgresql.crt within the user's home directory. A matching private key file .postgresql/postgresql.key must also be present, and must not be world-readable.'
                                


                                The only porblem with this is trying to import an openssl {key|crt} into a keytools keystore! Nightmare.. If anybody solves this, let me know.

                                Andrew

                                1 2 Previous Next