diff --git a/core/src/main/java/org/springframework/security/config/HttpSecurityBeanDefinitionParser.java b/core/src/main/java/org/springframework/security/config/HttpSecurityBeanDefinitionParser.java index 1f90aa86ff..36e9ef6f1b 100644 --- a/core/src/main/java/org/springframework/security/config/HttpSecurityBeanDefinitionParser.java +++ b/core/src/main/java/org/springframework/security/config/HttpSecurityBeanDefinitionParser.java @@ -414,7 +414,10 @@ public class HttpSecurityBeanDefinitionParser implements BeanDefinitionParser { return; } - throw new IllegalStateException("Couldn't set entry point"); + parserContext.getReaderContext().error("No AuthenticationEntryPoint could be established. Please" + + "make sure you have a login mechanism configured through the namespace (such as form-login) or" + + "specify a custom AuthenticationEntryPoint with the custom-entry-point-ref ", + parserContext.extractSource(element)); } static UrlMatcher createUrlMatcher(Element element) { diff --git a/samples/cas/client/src/main/webapp/WEB-INF/applicationContext-security.xml b/samples/cas/client/src/main/webapp/WEB-INF/applicationContext-security.xml index c852ab3560..ebf15f93c6 100644 --- a/samples/cas/client/src/main/webapp/WEB-INF/applicationContext-security.xml +++ b/samples/cas/client/src/main/webapp/WEB-INF/applicationContext-security.xml @@ -5,7 +5,7 @@ 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-2.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd"> - + @@ -28,10 +28,10 @@ - + - - + +