title: Error creating bean with name 'org.springframework.security.saml.trust.h ttpclient.TLSProtocolSocketFactory
body: <p>I am trying to configure my application which should support https only, and I have added the following configuration in the securityContext.xml file:</p>
  
  <pre><code>&lt;bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"&gt;
  &lt;property name="targetClass" value="org.apache.commons.httpclient.protocol.Protocol"/&gt;
  &lt;property name="targetMethod" value="registerProtocol"/&gt;
  &lt;property name="arguments"&gt;
  &lt;list&gt;
  &lt;value&gt;https&lt;/value&gt;
  &lt;bean class="org.apache.commons.httpclient.protocol.Protocol"&gt;
  &lt;constructor-arg value="https"/&gt;
  &lt;constructor-arg&gt;
  &lt;bean class="org.springframework.security.saml.trust.httpclient.TLSProtocolSocketFactory"/&gt;
  &lt;/constructor-arg&gt;
  &lt;constructor-arg value="443"/&gt;
  &lt;/bean&gt;
  &lt;/list&gt;
  &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>While running the server I am getting the following exception:</p>
  
  <p>Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.commons.httpclient.protocol.Pr
  otocol#59a20678' defined in ServletContext resource [/WEB-INF/securityContext.xml]: Cannot create inner bean 'org.springframework.security.s
  aml.trust.httpclient.TLSProtocolSocketFactory#5658808' of type [org.springframework.security.saml.trust.httpclient.TLSProtocolSocketFactory]
   while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with n
  ame 'org.springframework.security.saml.trust.httpclient.TLSProtocolSocketFactory#5658808' defined in ServletContext resource [/WEB-INF/secur
  ityContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantia
  te bean class [org.springframework.security.saml.trust.httpclient.TLSProtocolSocketFactory]: No default constructor found; nested exception
  is java.lang.NoSuchMethodException: org.springframework.security.saml.trust.httpclient.TLSProtocolSocketFactory.()
          at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
          at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:12
  0)
          at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630)
          at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFacto
  ry.java:1035)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactor
  y.java:939)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java
  :485)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:4
  56)
          at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
          ... 24 more
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.saml.trust.h
  ttpclient.TLSProtocolSocketFactory#5658808' defined in ServletContext resource [/WEB-INF/securityContext.xml]: Instantiation of bean failed;
   nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.security.sa
  ml.trust.httpclient.TLSProtocolSocketFactory]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.spring
  framework.security.saml.trust.httpclient.TLSProtocolSocketFactory.()
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.j
  ava:997)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactor
  y.java:943)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java
  :485)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:4
  56)
          at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
          ... 32 more
  Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.security.saml.trust.h
  ttpclient.TLSProtocolSocketFactory]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.springframework.
  security.saml.trust.httpclient.TLSProtocolSocketFactory.()
          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:72)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.j
  ava:990)
          ... 36 more
  Caused by: java.lang.NoSuchMethodException: org.springframework.security.saml.trust.httpclient.TLSProtocolSocketFactory.()
          at java.lang.Class.getConstructor0(Class.java:2971)
          at java.lang.Class.getDeclaredConstructor(Class.java:2165)
          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:67)
          ... 37 more
  Error listenerStart</p>
  
  <p>Could you please guide me on how to rectify this issue.? I am having the latest trunk.</p>