Announcement Announcement Module
Collapse
No announcement yet.
No mapping found for /spring-social-showcase/signin Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No mapping found for /spring-social-showcase/signin

    I got the spring social showcase app from GitHub and downgraded some of the JARs to mimic the dependency list that my production app has. I'm not really sure why I'm receiving the mapping error. Any help would be appreciated.

    Error:
    WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/spring-social-showcase/signin] in DispatcherServlet with name 'appServlet'

    WebMvcConfig.java
    Code:
    @Configuration
    public class WebMvcConfig {
    	@Inject
    	private ConnectionRepository connectionRepository;
    }
    web.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    
    	<!-- Java-based Spring container definition -->
    	<context-param>
        	<param-name>contextClass</param-name>
        	<param-value>org.springframework.web.context.support.AnnotationConfigWebApplicationContext</param-value>
    	</context-param>
    
    	<!-- Location of Java @Configuration classes that configure the components that makeup this application -->
    	<context-param>
        	<param-name>contextConfigLocation</param-name>
        	<param-value>org.springframework.social.showcase.config</param-value>
    	</context-param>
    
    	<!-- Creates the Spring Container shared by all Servlets and Filters -->
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    
    	<!-- Processes application requests -->
    	<servlet>
    		<servlet-name>appServlet</servlet-name>
    		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    		<init-param>
    			<param-name>contextConfigLocation</param-name>
    			<param-value>/WEB-INF/spring/webmvc-config.xml</param-value>
    		</init-param>
    		<load-on-startup>1</load-on-startup>
    	</servlet>
    	
    	<servlet-mapping>
    		<servlet-name>appServlet</servlet-name>
    		<url-pattern>/</url-pattern>
    	</servlet-mapping>
    
    	<!-- H2 Database Console for managing the app's database -->
    	<servlet>
    		<servlet-name>H2Console</servlet-name>
    		<servlet-class>org.h2.server.web.WebServlet</servlet-class>
    		<init-param>
    			<param-name>-webAllowOthers</param-name>
    			<param-value>true</param-value>
    		</init-param>
    		<load-on-startup>2</load-on-startup>
    	</servlet>
    
    	<servlet-mapping>
    		<servlet-name>H2Console</servlet-name>
    		<url-pattern>/admin/h2/*</url-pattern>
    	</servlet-mapping>
    	
    	<!-- Ensure UTF-8 encoded pages so that certain characters are displayed and submitted correctly -->
    	<filter>
    		<filter-name>encodingFilter</filter-name>
    		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    		<init-param>
    			<param-name>encoding</param-name>
    			<param-value>UTF-8</param-value>
    		</init-param>
    		<init-param>
    			<param-name>forceEncoding</param-name>
    			<param-value>true</param-value>
    		</init-param>
    	</filter>
    
    	<filter-mapping>
    		<filter-name>encodingFilter</filter-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>
    	
    	<!-- Secures the application -->
    	<filter>
    		<filter-name>securityFilter</filter-name>
    		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    		<init-param>
    			<param-name>targetBeanName</param-name>
    			<param-value>springSecurityFilterChain</param-value>
    		</init-param>
    	</filter>
    
    	<filter-mapping>
    		<filter-name>securityFilter</filter-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>
    	
    	<!-- Enables support for DELETE and PUT request methods with web browser clients -->
    	<filter>
    		<filter-name>hiddenHttpMethodFilter</filter-name>
    		<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
    	</filter>
    
    	<filter-mapping>
    		<filter-name>hiddenHttpMethodFilter</filter-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>
    		
    </web-app>
    webmvc-config.xml
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:p="http://www.springframework.org/schema/p" 
    	xmlns:aop="http://www.springframework.org/schema/aop" 
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
    	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd  
    	http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
    	
    	<!-- Turns on support for mapping requests to Spring MVC @Controller methods
    	     Also registers default Formatters and Validators for use across all @Controllers -->
    	<mvc:annotation-driven/>
    	
    	
    	<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" id="tilesViewResolver">
            <property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/>
        </bean>
        <bean class="org.springframework.web.servlet.view.tiles2.TilesConfigurer" id="tilesConfigurer">
            <property name="definitions">
                <list>
                    <value>/WEB-INF/layouts/tiles.xml</value>
                    <value>/WEB-INF/views/**/tiles.xml</value>
                </list>
            </property>
        </bean>
    	<bean class="org.springframework.context.support.ReloadableResourceBundleMessageSource" id="messageSource" p:basenames="/WEB-INF/messages/messages,WEB-INF/i18n/application" p:fallbackToSystemLocale="false"/>
    </beans>
    pom.xml changes
    Code:
    	<properties>
    		<java-version>1.6</java-version>
    		<org.springframework.social-version>1.0.2.RELEASE</org.springframework.social-version>
    		<org.springframework.social.facebook-version>1.0.1.RELEASE</org.springframework.social.facebook-version>
    		<org.springframework.social.twitter-version>1.0.2.RELEASE</org.springframework.social.twitter-version>
    		<org.springframework.social.linkedin-version>1.0.0.RC1</org.springframework.social.linkedin-version>
    		<org.springframework-version>3.0.7.RELEASE</org.springframework-version>
    		<org.springframework.security-version>3.1.0.RELEASE</org.springframework.security-version>
    		<org.slf4j-version>1.6.1</org.slf4j-version>
    	</properties>
    SocialConfig.java changes (Just hard coded the app id/secret and commented out the environment imports)
    Code:
    	@Bean
    	@Scope(value="singleton", proxyMode=ScopedProxyMode.INTERFACES) 
    	public ConnectionFactoryLocator connectionFactoryLocator() {
    		ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry();
    //		registry.addConnectionFactory(new TwitterConnectionFactory(environment.getProperty("twitter.consumerKey"), environment.getProperty("twitter.consumerSecret")));
    		registry.addConnectionFactory(new FacebookConnectionFactory("0b754d95f9c9899b0d6c4454b6f2dde7", "fa8a9825f555a7a8949ec48fb93bda58"));
    //		registry.addConnectionFactory(new LinkedInConnectionFactory(environment.getProperty("linkedin.consumerKey"), environment.getProperty("linkedin.consumerSecret")));
    		return registry;
    	}
    MainConfig.java (Just commented out these lines)
    Code:
    //@ComponentScan(basePackages = "org.springframework.social.showcase", excludeFilters = { @Filter(Configuration.class) })
    //@PropertySource("classpath:org/springframework/social/showcase/config/application.properties")
    //@EnableTransactionManagement

  • #2
    I can't say for sure what the problem is, but nowhere in what you've shown me do I see the configuration for ProviderSignInController. If ProviderSignInController isn't configured, then that's obviously the problem. If you do have it configured then we can dig a bit deeper.

    Comment

    Working...
    X