Announcement Announcement Module
Collapse
No announcement yet.
Changed direction, going xml config route. Exception in tag for jdbc repository Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changed direction, going xml config route. Exception in tag for jdbc repository

    OK, so no matter what I tried, I couldn't get the @Configuration for Spring Social to work with the already xml files I had for other configuration (Don't ask, but Spring Data Neo4j forced me to have it in xml because of cross-stores). So I decided to change tactics and go straight xml instead for configuring Spring Social.

    But I don't get far, right now I get

    Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'social:jdbc-connection-repository'.

    The IDE seemed to know about the tag as it added the social namespace automatically, and I can CTRL click on it and get to the xsd.

    But I get that error when I run it through the IDE through Tomcat 7.

    Here is now my xml config. All the other xml configs I posted for other parts are all still identical, except I removed the component-scan that picked up the @Configuration class, and I also commented those annotations from the @Configuration class just in case.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:facebook="http://www.springframework.org/schema/social/facebook"
           xmlns:twitter="http://www.springframework.org/schema/social/twitter"
           xmlns:social="http://www.springframework.org/schema/social"
           xmlns:c="http://www.springframework.org/schema/c"
           xmlns:p="http://www.springframework.org/schema/p"
           xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/social/facebook http://www.springframework.org/schema/social/spring-social-facebook.xsd http://www.springframework.org/schema/social/twitter http://www.springframework.org/schema/social/spring-social-twitter.xsd">
    
    
        <facebook:config app-id="${facebook.clientId}" app-secret="${facebook.clientSecret}" app-namespace="socialshowcase" />
        <twitter:config app-id="${twitter.consumerKey}" app-secret="${twitter.consumerSecret}"/>
    
        <social:jdbc-connection-repository/>
    
        <bean id="userIdSource" class="org.springframework.social.security.AuthenticationNameUserIdSource" />
    
        <bean id="connectController" class="org.springframework.social.connect.web.ConnectController" autowire="constructor">
        </bean>
    
        <bean id="providerSignInController"
              class="org.springframework.social.connect.web.ProviderSignInController"
              autowire="constructor" />
    
        <bean id="signInAdapter" class="com.blah.social.config.SpringSecuritySignInAdapter" autowire="constructor" />
    
        <bean id="socialAuthenticationFilter" class="org.springframework.social.security.SocialAuthenticationFilter"
       		c:authManager-ref="authenticationManager"
       		c:userIdSource-ref="userIdSource"
       		c:usersConnectionRepository-ref="usersConnectionRepository"
       		c:authServiceLocator-ref="connectionFactoryLocator"
       		p:signupUrl="/spring-social-showcase/signup"
       		p:rememberMeServices-ref="rememberMeService" />
    
       	<bean id="socialAuthenticationProvider" class="org.springframework.social.security.SocialAuthenticationProvider"
       		c:usersConnectionRepository-ref="usersConnectionRepository"
       		c:userDetailsService-ref="socialUsersDetailService" />
    
       	<bean id="socialUsersDetailService" class="com.blah.account.security.SimpleSocialUserDetailsService"
       		c:userDetailsService-ref="accountUserDetailsService" />
    
    </beans>
    Thanks.

    Mark
Working...
X