Eclipse RCP unable to update using p2 - eclipse-rcp

My RCP application is using standard p2 functionality to update the client code. This has worked for several years but has now stopped working on ONE particular site's repository. It fails with sun.security.validator.ValidatorException (full stack trace below).
I have other repositories with the same p2 repository that work correctly. I checked with the site owner and they said their site's SSL is setup correctly.
Any suggestions on how I can troubleshoot this issue either from my end or the site owner's end.
Thanks for reading and thinking about my question!
0170725 07:30:49.200 134118 ERROR com.xyz.acmotor.base.BusinessStatusHandler - uncaught exception: org.eclipse.equinox.p2.transport.ecf : Connection to https://www.example.com/sites/motordb_update/repository/p2.index failed on sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. Retry attempt 0 started
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.Handshaker.fatalSE(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.Handshaker.fatalSE(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.Handshaker.processLoop(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.Handshaker.process_record(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.AppOutputStream.write(Unknown Source) ~[na:1.8.0_60]
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:159) ~[na:na]
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:166) ~[na:na]
at org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:272) ~[na:na]
at org.apache.http.impl.AbstractHttpClientConnection.flush(AbstractHttpClientConnection.java:277) ~[na:na]
at org.apache.http.impl.conn.AbstractClientConnAdapter.flush(AbstractClientConnAdapter.java:201) ~[na:na]
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:239) ~[na:na]
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121) ~[na:na]
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:685) ~[na:na]
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:487) ~[na:na]
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) ~[na:na]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) ~[na:na]
at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer.performConnect(HttpClientRetrieveFileTransfer.java:1084) ~[na:na]
at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer.access$0(HttpClientRetrieveFileTransfer.java:1075) ~[na:na]
at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer$1.performFileTransfer(HttpClientRetrieveFileTransfer.java:1071) ~[na:na]
at org.eclipse.ecf.filetransfer.FileTransferJob.run(FileTransferJob.java:74) ~[na:na]
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) ~[na:na]
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(Unknown Source) ~[na:1.8.0_60]
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) ~[na:1.8.0_60]
at sun.security.validator.Validator.validate(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) ~[na:1.8.0_60]
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ~[na:1.8.0_60]
... 24 common frames omitted
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source) ~[na:1.8.0_60]
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) ~[na:1.8.0_60]
at java.security.cert.CertPathBuilder.build(Unknown Source) ~[na:1.8.0_60]
... 30 common frames omitted

The root cause for this error is the application has a bundled java keystore with an expired certificate. Now to figure out how to update over and http connection.

Related

Getting error while installing Eclipse 2020-R2

I recently downloaded Eclipse 2020-R2 installer. I was able to install successfully couple of days ago. My computer crashed and had to reinstall OS. Since then I have been unable to install same installer of Eclipse. I am getting Following error:
[2021-01-08 09:34:04] Repository http://download.eclipse.org/releases/2020-12/202012161000
[2021-01-08 09:34:04] Repository http://download.eclipse.org/oomph/updates/milestone/latest
[2021-01-08 09:34:06] ERROR: org.eclipse.equinox.p2.metadata.repository code=1002 Unable to read repository at http://download.eclipse.org/releases/2020-12/202012161000.
org.tukaani.xz.XZFormatException: Input is not in the XZ format
at org.tukaani.xz.common.DecoderUtil.decodeStreamHeader(Unknown Source)
at org.tukaani.xz.SingleXZInputStream.<init>(Unknown Source)
at org.tukaani.xz.SingleXZInputStream.<init>(Unknown Source)
at org.tukaani.xz.XZInputStream.<init>(Unknown Source)
at org.tukaani.xz.XZInputStream.<init>(Unknown Source)
at org.tukaani.xz.XZInputStream.<init>(Unknown Source)
at org.tukaani.xz.XZInputStream.<init>(Unknown Source)
at org.eclipse.equinox.internal.p2.metadata.repository.XZedSimpleMetadataRepositoryFactory.load(XZedSimpleMetadataRepositoryFactory.java:82)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:63)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:775)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.oomph.util.ReflectUtil.invokeMethod(ReflectUtil.java:119)
at org.eclipse.oomph.p2.internal.core.CachingRepositoryManager.loadRepository(CachingRepositoryManager.java:423)
at org.eclipse.oomph.p2.internal.core.CachingRepositoryManager.loadRepository(CachingRepositoryManager.java:214)
at org.eclipse.oomph.p2.internal.core.CachingRepositoryManager$Metadata.loadRepository(CachingRepositoryManager.java:495)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:110)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:105)
at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl$RepositoryLoader$Worker.perform(ProfileTransactionImpl.java:1578)
at org.eclipse.oomph.util.WorkerPool$Worker.run(WorkerPool.java:434)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
[2021-01-08 09:34:06]

wlst offline add user to existing domain

I would like to use WLST to add a user to an existing domain in offline mode. Is this possible?
I have the following script
readDomain(DOMAIN_HOME)
cd('/Security')
cd(DOMAIN_NAME)
cd('User')
user = create(USERNAME,"User")
user.setPassword(PASSWORD)
and it barfs out the following error that i can't make heads or tails out of.
com.oracle.cie.domain.script.jython.WLSTException: Security info unavailable when a domain is read and no security type can be created.
at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:69)
at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:3085)
at com.oracle.cie.domain.script.jython.WLScriptContext.cd(WLScriptContext.java:1451)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.oracle.cie.domain.script.jython.WLSTState.processCommand(WLSTState.java:226)
at com.oracle.cie.domain.script.jython.WLScriptContext.runCmd(WLScriptContext.java:732)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyMethod.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyInstance.invoke(Unknown Source)
at org.python.pycode._pyx5.command$1(/private/var/folders/05/lxzxmx693njf8gvh69p39nnr0000gn/T/WLSTOfflineIni3567769399441384102.py:19)
at org.python.pycode._pyx5.call_function(/private/var/folders/05/lxzxmx693njf8gvh69p39nnr0000gn/T/WLSTOfflineIni3567769399441384102.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(PyFunction.java:184)
at org.python.pycode._pyx5.cd$12(/private/var/folders/05/lxzxmx693njf8gvh69p39nnr0000gn/T/WLSTOfflineIni3567769399441384102.py:55)
at org.python.pycode._pyx5.call_function(/private/var/folders/05/lxzxmx693njf8gvh69p39nnr0000gn/T/WLSTOfflineIni3567769399441384102.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(PyFunction.java:181)
at org.python.pycode._pyx105.f$0(<console>:1)
at org.python.pycode._pyx105.call_function(<console>)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyCode.call(Unknown Source)
at org.python.core.Py.runCode(Py.java:1226)
at org.python.core.Py.exec(Py.java:1252)
at org.python.util.PythonInterpreter.exec(Unknown Source)
at org.python.util.InteractiveInterpreter.runcode(Unknown Source)
at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
at weblogic.management.scripting.utils.WLSTInterpreter.runsource(WLSTInterpreter.java:1095)
at weblogic.management.scripting.WLST.main(WLST.java:232)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at weblogic.WLST.main(WLST.java:47)
Caused by: java.lang.Exception: Security info unavailable when a domain is read and no security type can be created.
at com.oracle.cie.domain.script.jython.WLScriptContext.blockSecurity4ReadDomain(WLScriptContext.java:3777)
at com.oracle.cie.domain.script.jython.WLScriptContext.updateCmo(WLScriptContext.java:3376)
at com.oracle.cie.domain.script.jython.WLScriptContext.cd(WLScriptContext.java:1441)
... 42 more
With WLST, it is not possible. Security configuration must be done connected to the admin server.
Another option is to create a domain template and include your users.

Tomcat v9.0 server at localhost has encountered a problem-- Caused by: java.io.FileNotFoundException

I'm trying to run Tomcat v9.0 server in Eclipse with 2 jar files:
taglibs-standard-impl-1.2.5.jar
taglibs-standard-spec-1.2.5.jar
But I kept running into this error message: "Server Tomcat v9.0 Server at localhost failed to start." And error log indicates that it caused by Caused by: java.io.FileNotFoundException:C:\Users\abdc\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\PM4\WEB-INF\lib\taglibs-standard-impl-1.2.5.jar (The system cannot find the path specified)
I doubled check my jar file paths and they are in the right location with the rest of the project:
C:\Users\abdc\Desktop\WebContent\WEB-INF\lib\taglibs-standard-impl-1.2.5.jar
C:\Users\abdc\Desktop\WebContent\WEB-INF\lib\taglibs-standard-spec-1.2.5.jar
Any insight would be really appreciated. This is my error logs:
Jul 11, 2020 12:39:50 AM org.apache.catalina.core.StandardContext backgroundProcess
WARNING: Exception processing loader [WebappLoader[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/PM4]]] background process
java.lang.IllegalStateException: java.io.FileNotFoundException: C:\Users\abdc\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\PM4\WEB-INF\lib\taglibs-standard-impl-1.2.5.jar (The system cannot find the path specified)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:101)
at org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:256)
at org.apache.catalina.webresources.StandardRoot.getResourceInternal(StandardRoot.java:281)
at org.apache.catalina.webresources.Cache.getResource(Cache.java:62)
at org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:216)
at org.apache.catalina.webresources.StandardRoot.getClassLoaderResource(StandardRoot.java:225)
at org.apache.catalina.loader.WebappClassLoaderBase.modified(WebappClassLoaderBase.java:740)
at org.apache.catalina.loader.WebappLoader.modified(WebappLoader.java:350)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:294)
at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5527)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1353)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1335)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\Users\abdc\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\PM4\WEB-INF\lib\taglibs-standard-impl-1.2.5.jar (The system cannot find the path specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:221)
at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:206)
at org.apache.catalina.webresources.AbstractArchiveResourceSet.openJarFile(AbstractArchiveResourceSet.java:307)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:97)
... 21 more
Jul 11, 2020 12:40:00 AM org.apache.catalina.core.StandardContext backgroundProcess
WARNING: Exception processing loader [WebappLoader[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/PM4]]] background process
java.lang.IllegalStateException: java.io.FileNotFoundException: C:\Users\abdc\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\PM4\WEB-INF\lib\taglibs-standard-impl-1.2.5.jar (The system cannot find the path specified)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:101)
at org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:256)
at org.apache.catalina.webresources.StandardRoot.getResourceInternal(StandardRoot.java:281)
at org.apache.catalina.webresources.Cache.getResource(Cache.java:62)
at org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:216)
at org.apache.catalina.webresources.StandardRoot.getClassLoaderResource(StandardRoot.java:225)
at org.apache.catalina.loader.WebappClassLoaderBase.modified(WebappClassLoaderBase.java:740)
at org.apache.catalina.loader.WebappLoader.modified(WebappLoader.java:350)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:294)
at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5527)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1353)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1335)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\Users\abdc\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\PM4\WEB-INF\lib\taglibs-standard-impl-1.2.5.jar (The system cannot find the path specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:221)
at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:206)
at org.apache.catalina.webresources.AbstractArchiveResourceSet.openJarFile(AbstractArchiveResourceSet.java:307)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:97)
... 21 more
This is my file directory:
File directory
Wrong path,
U must paste your jar file in this path :
C:\Users\abdc\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\PM4\WEB-INF\lib\

Webstart issue with eclipse RCP export action

I have eclipse sample eclipse RCP application. I am trying to export it for WebStart. but it gives following error message while exporting the feature project.
D:\apps\eclipse-jee-kepler-SR2-win32-x86_64\eclipse\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.p2.xml:43: The following error occurred while executing this line:
D:\apps\eclipse-jee-kepler-SR2-win32-x86_64\eclipse\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.p2.xml:64: The jarsigner could not be found. Make sure to run with the build with a JDK.
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:672)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:498)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
at org.eclipse.pde.internal.core.exports.FeatureExportOperation.runScript(FeatureExportOperation.java:422)
at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:267)
at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:223)
at org.eclipse.pde.internal.core.exports.FeatureExportOperation.run(FeatureExportOperation.java:100)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: D:\apps\eclipse-jee-kepler-SR2-win32-x86_64\eclipse\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.p2.xml:64: The jarsigner could not be found. Make sure to run with the build with a JDK.
at org.eclipse.equinox.internal.p2.jarprocessor.ant.AntSignCommand.execute(AntSignCommand.java:54)
at org.eclipse.equinox.internal.p2.jarprocessor.ant.AntSignCommand.postProcess(AntSignCommand.java:36)
at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor.postProcess(JarProcessor.java:252)
at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor.processJar(JarProcessor.java:345)
at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.process(JarProcessorExecutor.java:173)
at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.processDirectory(JarProcessorExecutor.java:195)
at org.eclipse.equinox.internal.p2.jarprocessor.ant.AntBasedProcessorExecutor.processDirectory(AntBasedProcessorExecutor.java:60)
at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.process(JarProcessorExecutor.java:155)
at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.runJarProcessor(JarProcessorExecutor.java:82)
at org.eclipse.equinox.internal.p2.jarprocessor.ant.JarProcessorTask.execute(JarProcessorTask.java:109)
at org.eclipse.equinox.p2.internal.repository.tools.tasks.ProcessRepoTask.execute(ProcessRepoTask.java:87)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
... 26 more
Caused by: Execute failed: java.io.IOException: Cannot run program "jarsigner.exe" (in directory "D:\apps\eclipse-jee-kepler-SR2-win32-x86_64\eclipse\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature"): CreateProcess error=2, The system cannot find the file specified
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:675)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
at org.apache.tools.ant.taskdefs.SignJar.signOneJar(SignJar.java:490)
at org.apache.tools.ant.taskdefs.SignJar.execute(SignJar.java:405)
at org.eclipse.equinox.internal.p2.jarprocessor.ant.AntSignCommand.execute(AntSignCommand.java:51)
... 49 more
Caused by: java.io.IOException: Cannot run program "jarsigner.exe" (in directory "D:\apps\eclipse-jee-kepler-SR2-win32-x86_64\eclipse\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
... 53 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 60 more
change the java build path in eclipse to pick up jarsigner.exe under jdk.

Problems connecting Pentaho Kettle/Spoon to Heroku PostgreSQL using SSL

I'm trying to connect spoon to a Heroku PostgreSQL instance using the JDBC driver that came with Spoon. Heroku requires SSL for it's stand alone PostgreSQL instances, which I have enabled.
I'm able to connect to the database using other client software using SSL so this seems to be specific to Java/JDBC. I don't know enough about Java to troubleshoot this so hoping someone out there has been though this before.
I get the following and rather verbose error message which mentions a SSLHandshakeException, but I'm not sure if this is the cause or a symptom of something else? Perhaps I need to specify SSL certificates in Java?
Error connecting to database [XXXX.com] : org.pentaho.di.core.exception.KettleDatabaseException:
Error occured while trying to connect to the database
Error connecting to database: (using class org.postgresql.Driver)
The connection attempt failed.
org.pentaho.di.core.exception.KettleDatabaseException:
Error occured while trying to connect to the database
Error connecting to database: (using class org.postgresql.Driver)
The connection attempt failed.
at org.pentaho.di.core.database.Database.normalConnect(Database.java:374)
at org.pentaho.di.core.database.Database.connect(Database.java:323)
at org.pentaho.di.core.database.Database.connect(Database.java:285)
at org.pentaho.di.core.database.Database.connect(Database.java:275)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:76)
at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2455)
at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:511)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:329)
at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:139)
at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:123)
at org.pentaho.ui.xul.swt.tags.SwtButton.access$500(SwtButton.java:26)
at org.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:119)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:378)
at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:304)
at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:104)
at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:51)
at org.pentaho.di.ui.trans.step.BaseStepDialog$3.widgetSelected(BaseStepDialog.java:480)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.pentaho.di.ui.trans.steps.tableoutput.TableOutputDialog.open(TableOutputDialog.java:916)
at org.pentaho.di.ui.spoon.delegates.SpoonStepsDelegate.editStep(SpoonStepsDelegate.java:126)
at org.pentaho.di.ui.spoon.Spoon.editStep(Spoon.java:7733)
at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:2744)
at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:693)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1169)
at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:6945)
at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:553)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.pentaho.commons.launcher.Launcher.main(Launcher.java:134)
Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
Error connecting to database: (using class org.postgresql.Driver)
The connection attempt failed.
at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:510)
at org.pentaho.di.core.database.Database.normalConnect(Database.java:358)
... 50 more
Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:152)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:32)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:490)
... 51 more
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at org.postgresql.core.PGStream.flush(PGStream.java:523)
at org.postgresql.core.v3.ConnectionFactoryImpl.sendStartupPacket(ConnectionFactoryImpl.java:259)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:105)
... 62 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
... 75 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
... 81 more
Hostname : XXXX.com
Port : 5432
Database name : XXXX
I found the issue. Simply passing
ssl = true
isn't enough for JDBC, you also need to install the correct root certificates in your Java keystore so that PgJDBC can verify the remote certificate.
If you don't want to configure the root certificate store you may instead pass:
ssl = true
sslfactory = org.postgresql.ssl.NonValidatingFactory
though doing so disables man-in-the-middle attack protection, so your SSL session no longer has reliable end-to-end security.
See the Heroku docs here:
http://devcenter.heroku.com/articles/connecting-to-relational-databases-on-heroku-with-java#connecting_to_a_dedicated_database_remotely
(Warning about SSL security added by Craig Ringer)
The basic problem seems to be the SSL handshake. Excerpt from your error messages:
Caused by: sun.security.validator.ValidatorException: PKIX path building failed:
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
This is not a PostgreSQL specific problem, it's a pure SSL thing. Using these error messages you can find quite some help on this site. Skimming through them this answer looks promising to me and it might guide you into the right direction:
https://stackoverflow.com/a/6908991/947357