title: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#7': Instantiation of bean failed
body: <p>I'm basically trying to implement openId in spring which will allow user to login through goggle and extract their emailId, name and save in data base</p>
  
  <p>After adding openid4java jar, now I'm getting the following exception:</p>
  
  <pre><code>SEVERE: Exception sending context initialized event to listener instance of class    
  org.springframework.web.context.ContextLoaderListener
  org.springframework.beans.factory.BeanCreationException: Error creating bean with     name 'org.springframework.security.openid.OpenIDAuthenticationFilter#0': Cannot create inner bean '(inner bean)' of type [org.springframework.security.openid.OpenID4JavaConsumer] while setting bean property 'consumer'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#7': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.security.openid.OpenID4JavaConsumer]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/http/client/ClientProtocolException
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1308)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:562)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:871)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
      at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#7': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.security.openid.OpenID4JavaConsumer]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/http/client/ClientProtocolException
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:281)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:984)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:888)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
      ... 25 more
  Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.security.openid.OpenID4JavaConsumer]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/http/client/ClientProtocolException
      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:107)
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:273)
      ... 30 more
  Caused by: java.lang.NoClassDefFoundError: org/apache/http/client/ClientProtocolException
      at org.openid4java.consumer.ConsumerManager.&lt;init&gt;(ConsumerManager.java:146)
      at org.springframework.security.openid.OpenID4JavaConsumer.&lt;init&gt;(OpenID4JavaConsumer.java:62)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
      ... 32 more
  Caused by: java.lang.ClassNotFoundException: org.apache.http.client.ClientProtocolException
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
      ... 39 more
  </code></pre>
  
  <p>Library:</p>
  
  <pre><code>activation-1.0.2.jar
  antlr-2.7.6.jar
  aopalliance-1.0.jar
  asm-1.5.3.jar
  asm-attrs-1.5.3.jar
  cglib-2.1_3.jar
  commons-beanutils-1.7.0.jar
  commons-collection-2.1.1.jar
  commons-digester-1.8.jar
  commons-email-1.0.jar
  commons-fileupload-1.1.1.jar
  commons-io-1.1.jar
  commons-lang-2.5.jar
  commons-logging-1.1.1.jar
  dom4j-1.6.1.jar
  dumbster-1.6.jar
  ehchache-1.2.3.jar
  hibernate-3.2.6.ga.jar
  hibernate-annotations-3.3.1.GA.jar
  hibernate-commons-annotations-3.0.0.ga.jar
  hibernate-entitymanager-3.3.2.GA.jar
  hibernate-search-3.0.0.GA.jar
  hibernate-validator-4.0.2.GA.jar
  jackson-all-1.9.11.jar
  jackson-jaxrs-1.9.13.jar
  javassist-3.4.GA.jar
  jaxb-api-2.1.jar
  jaxb-impl-2.1.3.jar
  jaxen-1.1.1.jar
  jdom-1.0.jar
  jstl.1.2.jar
  jta-1.1.jar
  log4j-1.2.14.jar
  luncene-core-2.3.2.jar
  luncene-highlighter-2.0.0.jar
  mail-1.4.jar
  mysql-connector-java-5.0.5.jar
  openid4java-0.9.8.jar
  persistance-api-1.0.jar
  quartz-1.5.2.jar
  slf4j-api-1.5.6.jar
  slf4j-log4j12-1.5.6.jar
  spring-aop-3.0.1.RELEASE.jar
  spring-asm-3.0.1.RELEASE.jar
  spring-beans-3.0.1.RELEASE.jar
  spring-context-3.0.1.RELEASE.jar
  spring-core-3.0.1.RELEASE.jar
  spring-expression-3.0.1.RELEASE.jar
  spring-jdbc-3.0.1.RELEASE.jar
  spring-orm-3.0.1.RELEASE.jar
  spring-oxm-3.0.1.RELEASE.jar
  spring-security-config-3.0.1.RELEASE.jar
  spring-security-core-3.0.1.RELEASE.jar
  spring-security-openid-3.0.1.RELEASE.jar
  spring-security-step2-3.0.2.RELEASE.jar
  spring-security-taglibs-3.0.1.RELEASE.jar
  spring-security-web-3.0.1.RELEASE.jar
  spring-tx-3.0.1.RELEASE.jar
  spring-web-3.0.1.RELEASE.jar
  spring-webmvc-3.0.1.RELEASE.jar
  stax-api-1.0-2.jar
  validation-api-1.0.0.GA.jar
  xalan-2.6.0.jar
  xercesImpl-2.6.2.jar
  xml-apis-1.3.02.jar
  xmlParserAPIs-2.6.2.jar
  xom-1.0.jar
  </code></pre>