0

I'm following this tutorial on setting up the ability to read from a Greenhouse activity stream. However I'm getting this stack trace and I have no idea what it means or where to go from here. Could someone point me in the right direction for getting this working?

java.net.SocketException: Unconnected sockets not implemented
javax.net.SocketFactory.createSocket(SocketFactory.java:7)
org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:288)
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:119)
org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:147)
org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
net.oauth.client.httpclient4.HttpClient4.execute(HttpClient4.java:100)
net.oauth.client.OAuthClient.access(OAuthClient.java:325)
net.oauth.client.OAuthClient.invoke(OAuthClient.java:306)
net.oauth.client.OAuthClient.invoke(OAuthClient.java:262)
net.oauth.client.OAuthClient.getRequestTokenResponse(OAuthClient.java:192)
net.oauth.client.OAuthClient.getRequestToken(OAuthClient.java:150)
com.ibm.xsp.extlib.sbt.security.oauth_10a.util.OADance._perform3LegsDance(OADance.java:149)
com.ibm.xsp.extlib.sbt.security.oauth_10a.util.OADance.perform3LegsDance(OADance.java:138)
com.ibm.xsp.extlib.sbt.security.oauth_10a.OAProvider._acquireToken(OAProvider.java:292)
com.ibm.xsp.extlib.sbt.security.oauth_10a.OAProvider.acquireToken(OAProvider.java:260)
com.ibm.xsp.extlib.sbt.security.oauth_10a.OAProvider.acquireToken(OAProvider.java:248)
com.ibm.xsp.extlib.sbt.security.oauth_10a.OAProvider.acquireToken(OAProvider.java:240)
com.ibm.xsp.extlib.sbt.services.client.endpoints.OAuthEndpointBean.initialize(OAuthEndpointBean.java:145)
com.ibm.xsp.extlib.sbt.services.client.ClientService._execRequest(ClientService.java:385)
com.ibm.xsp.extlib.sbt.services.client.ClientService.execRequest(ClientService.java:358)
com.ibm.xsp.extlib.sbt.services.client.ClientService.execRequest(ClientService.java:328)
com.ibm.xsp.extlib.sbt.services.client.ClientService.get(ClientService.java:257)
com.ibm.xsp.extlib.sbt.activitystreams.ActivityStreamDataSource$ASJsonAccessor.loadBlock(ActivityStreamDataSource.java:112)
com.ibm.xsp.extlib.model.DataBlockAccessor.findBlockByIndex(DataBlockAccessor.java:344)
com.ibm.xsp.extlib.model.DataBlockAccessor.prefetchData(DataBlockAccessor.java:292)
com.ibm.xsp.extlib.model.DataAccessorModel.getRowCount(DataAccessorModel.java:93)
com.ibm.xsp.component.UIPager$PagerState.<init>(UIPager.java:76)
com.ibm.xsp.component.UIPager$PagerState.<init>(UIPager.java:71)
com.ibm.xsp.component.UIPager.createPagerState(UIPager.java:540)

*UPDATE: I added the following to the start method of my plugin's Activator class:

Security.setProperty("ssl.SocketFactory.provider", "com.ibm.jsse2.SSLSocketFactoryImpl")

Here is my faces-config file:

<?xml version="1.0" encoding="UTF-8"?>
<faces-config>
  <managed-bean id="OAuth Security Store">
  <managed-bean-name>NSFStore</managed-bean-name>
  <managed-bean-class>com.ibm.xsp.extlib.sbt.security.oauth_10a.store.OAuthNSFTokenStore</managed-bean-class>
  <managed-bean-scope>application</managed-bean-scope>
    <managed-property>
      <property-name>database</property-name>
      <value>websecurity.nsf</value>
    </managed-property>
  </managed-bean>
<managed-bean id="Greenhouse Endpoint">
  <managed-bean-name>greenHouse</managed-bean-name>
  <managed-bean-class>com.ibm.xsp.extlib.sbt.services.client.endpoints.OAuthEndpointBean</managed-bean-class>
  <managed-bean-scope>application</managed-bean-scope>
  <managed-property>
    <property-name>url</property-name>
    <value>https://greenhouse.lotus.com</value>
  </managed-property>
  <managed-property>
    <property-name>serviceName</property-name>
    <value>Greenhouse</value>
  </managed-property>
  <managed-property>
    <property-name>appId</property-name>
    <value>rpdPlayground</value>
  </managed-property>
  <managed-property>
    <property-name>tokenStore</property-name>
    <value>NSFStore</value>
  </managed-property>
  <managed-property>
    <property-name>forceTrustSSLCertificate</property-name>
    <value>true</value>
  </managed-property>
  <managed-property>
    <property-name>proxyEnabled</property-name>
    <value>true</value>
  </managed-property>
</managed-bean>
  <!--AUTOGEN-START-BUILDER: Automatically generated by IBM Domino Designer. Do not modify.-->
  <!--AUTOGEN-END-BUILDER: End of automatically generated section-->
</faces-config>

This is running on Domino 9.0 with the com.ibm.xsp.extlibx plugins, version 8.5.3.20121217-1354.

keithstric
  • 1,053
  • 1
  • 11
  • 21
  • possible duplicate of ["SocketException: Unconnected sockets not implemented" with self-signed SSL certificate](http://stackoverflow.com/questions/116635/socketexception-unconnected-sockets-not-implemented-with-self-signed-ssl-cert) – Flow Jan 04 '15 at 10:18

1 Answers1

0

See: HTTPClient-java.net.SocketException: Unconnected sockets not implemented thrown

Seems to be related to SSL connection with the Apache HTTP client. So you can try to set the System property as mentioned, or, as a test option, you can try to disable SSL checking in the endpoint by setting the property forceTrustSSLCertificate to the bean.

Community
  • 1
  • 1
Philippe Riand
  • 673
  • 4
  • 12
  • Thanks Philippe, OK, I added forceTrustSSLCertificate to the bean definition and: Security.setProperty("ssl.SocketFactory.provider", "com.ibm.jsse2.SSLSocketFactoryImpl"); to the activator of my plugin but still get the same results. – keithstric Feb 04 '13 at 17:04
  • you might cross reference - http://stackoverflow.com/questions/1739063/httpclient-java-net-socketexception-unconnected-sockets-not-implemented-thrown – Paul Bastide Feb 05 '13 at 16:04
  • Thanks Paul, yes I did have a look at that and implemented it with no change in the results. – keithstric Feb 05 '13 at 16:36