Hi,
I am trying to add provider sign in capability my Spring application using ProviderSignInController.
Here is xml configuration:
The war file generation is successfull, but when I try to deploy it in tomcat, I get the following error:Code:<bean class="org.springframework.social.connect.signin.web.ProviderSignInController"> <constructor-arg index="0" value="http://localhost:8080/myapp"/> <constructor-arg index="1" ref="connectionFactoryLocator"/> <constructor-arg index="2" ref="usersConnectionRepository"/> <constructor-arg index="3" ref="connectionRepository"/> <constructor-arg index="4" ref="signInService"/> </bean> <bean id="connectionFactoryLocator" class="org.springframework.social.connect.support.ConnectionFactoryRegistry"> <property name="connectionFactories"> <list> <bean class="org.springframework.social.linkedin.connect.LinkedInConnectionFactory"> <constructor-arg value="abc"/> <constructor-arg value="KHufIUf"/> </bean> </list> </property> </bean> <bean id="usersConnectionRepository" class="org.springframework.social.connect.jdbc.JdbcUsersConnectionRepository"> <constructor-arg ref="upcaseco_innoveDS"/> <constructor-arg ref="connectionFactoryLocator"/> <constructor-arg ref="textEncryptor"/> </bean> <bean id="textEncryptor" class="org.springframework.security.crypto.encrypt.Encryptors" factory-method="noOpText"/> <bean id="connectionRepository" factory-method="createConnectionRepository" factory-bean="usersConnectionRepository" scope="request"> <constructor-arg value="#{request.userPrincipal}"/> <aop:scoped-proxy proxy-target-class="false"/> </bean> <bean id="signInService" class="org.springframework.webflow.security.SpringSecuritySignInService"/> <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"> <constructor-arg ref="upcaseco_innoveDS"/> </bean>
Any suggestions on why I am getting this runtime error ?Code:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.social.connect.signin.web.ProviderSignInController#0' defined in class path resource [xx014-web-context.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [javax.inject.Provider]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?
pom.xml has these dependencies defined:
Code:<dependency> <groupId>org.springframework.social</groupId> <artifactId>spring-social-linkedin</artifactId> <version>1.0.0.M3</version> </dependency> <dependency> <groupId>org.springframework.social</groupId> <artifactId>spring-social-web</artifactId> <version>1.0.0.M3</version> </dependency> <dependency> <groupId>org.springframework.social</groupId> <artifactId>spring-social-core</artifactId> <version>1.0.0.M3</version> </dependency>


Reply With Quote