I was trying to deploy the camel-example-twitter-websocket-blueprint
example in DDF 2.8.1 (uses Karaf version 2.4.3) and I get the exception
shown below.  I'm not sure if anyone has experienced this and may know how
to get this bundle working inside OSGi with the proper Twitter certificate
information.


10:39:22,429 | INFO  | 00 milliseconds] | twitter4j.CommonsLoggingLogger
          63 | ix.bundles.twitter4j | Establishing connection.
10:39:22,495 | INFO  | hing connection] | twitter4j.CommonsLoggingLogger
          63 | ix.bundles.twitter4j |
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
10:39:22,495 | INFO  | hing connection] | twitter4j.CommonsLoggingLogger
          63 | ix.bundles.twitter4j | Waiting for 16000 milliseconds
10:39:23,039 | WARN  | twitter://search | org.apache.camel.util.CamelLogger
        224 | che.camel.camel-core | Consumer
Consumer[twitter://search?accessToken=<removed>] failed polling endpoint:
Endpoint[twitter://search?accessToken=<removed>]. Will try again at next
poll. Caused by: [twitter4j.TwitterException -
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target]
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
Relevant discussions can be found on the Internet at:
        http://www.google.co.jp/search?q=506c3b98 or
        http://www.google.co.jp/search?q=105d1087
TwitterException{exceptionCode=[506c3b98-105d1087 63e3f388-fb44fc20
63e3f388-fb44fc20 63e3f388-fb44fc20], statusCode=-1, message=null, code=-1,
retryAfter=-1, rateLimitStatus=null, version=4.0.2}
        at
twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:178)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
twitter4j.HttpClientBase.request(HttpClientBase.java:53)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
twitter4j.HttpClientBase.get(HttpClientBase.java:71)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
twitter4j.TwitterImpl.get(TwitterImpl.java:1556)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
twitter4j.TwitterImpl.search(TwitterImpl.java:247)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
org.apache.camel.component.twitter.consumer.search.SearchConsumer.search(SearchConsumer.java:84)[407:org.apache.camel.camel-twitter:2.14.2]
        at
org.apache.camel.component.twitter.consumer.search.SearchConsumer.pollConsume(SearchConsumer.java:52)[407:org.apache.camel.camel-twitter:2.14.2]
        at
org.apache.camel.component.twitter.consumer.TwitterConsumerPolling.poll(TwitterConsumerPolling.java:65)[407:org.apache.camel.camel-twitter:2.14.2]
        at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)[186:org.apache.camel.camel-core:2.14.2]
        at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)[186:org.apache.camel.camel-core:2.14.2]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_51]
        at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_51]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_51]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_51]
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_51]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_51]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_51]
Caused by: javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid c
ertification path to requested target
        at
sun.security.ssl.Alerts.getSSLException(Alerts.java:192)[:1.8.0_51]
        at
sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)[:1.8.0_51]
        at
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)[:1.8.0_51]
        at
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)[:1.8.0_51]
        at
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1497)[:1.8.0_51]
        at
sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212)[:1.8.0_51]
        at
sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)[:1.8.0_51]
        at
sun.security.ssl.Handshaker.process_record(Handshaker.java:914)[:1.8.0_51]
        at
sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)[:1.8.0_51]
        at
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)[:1.8.0_51]
        at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)[:1.8.0_51]
        at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)[:1.8.0_51]
        at
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)[:1.8.0_51]
        at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)[:1.8.0_51]
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)[:1.8.0_51]
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)[:1.8.0_51]
        at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)[:1.8.0_51]
        at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)[:1.8.0_51]
        at
twitter4j.HttpResponseImpl.<init>(HttpResponseImpl.java:35)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:142)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        ... 16 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(PKIXValidator.java:387)[:1.8.0_51]
        at
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)[:1.8.0_51]
        at
sun.security.validator.Validator.validate(Validator.java:260)[:1.8.0_51]
        at
sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)[:1.8.0_51]
        at
sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)[:1.8.0_51]
        at
sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)[:1.8.0_51]
        at
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1479)[:1.8.0_51]
        ... 31 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
        at
sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:145)[:1.8.0_51]
        at
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)[:1.8.0_51]
        at
java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)[:1.8.0_51]
        at
sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)[:1.8.0_51]
        ... 37 more
10:39:28,108 | WARN  | twitter://search | org.apache.camel.util.CamelLogger
        224 | che.camel.camel-core | Consumer
Consumer[twitter://search?accessToken=<removed>] failed polling endpoint:
Endpoint[twitter://search?accessToken=<removed>]. Will try again at next
poll. Caused by: [twitter4j.TwitterException -
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target]
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
Relevant discussions can be found on the Internet at:
        http://www.google.co.jp/search?q=506c3b98 or
        http://www.google.co.jp/search?q=105d1087
TwitterException{exceptionCode=[506c3b98-105d1087 63e3f388-fb44fc20
63e3f388-fb44fc20 63e3f388-fb44fc20], statusCode=-1, message=null, code=-1,
retryAfter=-1, rateLimitStatus=null, version=4.0.2}
        at
twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:178)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
twitter4j.HttpClientBase.request(HttpClientBase.java:53)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
twitter4j.HttpClientBase.get(HttpClientBase.java:71)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
twitter4j.TwitterImpl.get(TwitterImpl.java:1556)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
twitter4j.TwitterImpl.search(TwitterImpl.java:247)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
org.apache.camel.component.twitter.consumer.search.SearchConsumer.search(SearchConsumer.java:84)[407:org.apache.camel.camel-twitter:2.14.2]
        at
org.apache.camel.component.twitter.consumer.search.SearchConsumer.pollConsume(SearchConsumer.java:52)[407:org.apache.camel.camel-twitter:2.14.2]
        at
org.apache.camel.component.twitter.consumer.TwitterConsumerPolling.poll(TwitterConsumerPolling.java:65)[407:org.apache.camel.camel-twitter:2.14.2]
        at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)[186:org.apache.camel.camel-core:2.14.2]
        at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)[186:org.apache.camel.camel-core:2.14.2]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_51]
        at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_51]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_51]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_51]
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_51]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_51]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_51]
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
sun.security.ssl.Alerts.getSSLException(Alerts.java:192)[:1.8.0_51]
        at
sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)[:1.8.0_51]
        at
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)[:1.8.0_51]
        at
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)[:1.8.0_51]
        at
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1497)[:1.8.0_51]
        at
sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212)[:1.8.0_51]
        at
sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)[:1.8.0_51]
        at
sun.security.ssl.Handshaker.process_record(Handshaker.java:914)[:1.8.0_51]
        at
sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)[:1.8.0_51]
        at
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)[:1.8.0_51]
        at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)[:1.8.0_51]
        at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)[:1.8.0_51]
        at
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)[:1.8.0_51]
        at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)[:1.8.0_51]
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)[:1.8.0_51]
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)[:1.8.0_51]
        at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)[:1.8.0_51]
        at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)[:1.8.0_51]
        at
twitter4j.HttpResponseImpl.<init>(HttpResponseImpl.java:35)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        at
twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:142)[406:org.apache.servicemix.bundles.twitter4j:4.0.2.1]
        ... 16 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(PKIXValidator.java:387)[:1.8.0_51]
        at
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)[:1.8.0_51]
        at
sun.security.validator.Validator.validate(Validator.java:260)[:1.8.0_51]
        at
sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)[:1.8.0_51]
        at
sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)[:1.8.0_51]
        at
sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)[:1.8.0_51]
        at
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1479)[:1.8.0_51]
        ... 31 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
        at
sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:145)[:1.8.0_51]
        at
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)[:1.8.0_51]
        at
java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)[:1.8.0_51]
        at
sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)[:1.8.0_51]
        ... 37 more

Reply via email to