java - Spring Security error while creating bean with name 'org.springframework.security.filterChains' -
after while away programming, i'm attemping tutorial on angular twitter bootstrap spring mvc, data , security (it's written in portuguese).
all errors on eclipse corrected , seems fine, when try run
mvn clean install tomcat7:run
i regular console output , following error. i'm rusted on debugging this.
[error] context initialization failed org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.security.filterchains': cannot resolve reference bean 'org.springframework.security.web.defaultsecurityfilterchain#0' while setting bean property 'sourcelist' key [0]; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.security.web.defaultsecurityfilterchain#0': cannot resolve reference bean 'org.springframework.security.web.access.intercept.filtersecurityinterceptor#0' while setting constructor argument key [9]; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.security.web.access.intercept.filtersecurityinterceptor#0': invocation of init method failed; nested exception java.lang.illegalargumentexception: unsupported configuration attributes: [isauthenticated(), permitall]
my spring-jpa.xml is
<?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:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/task/spring-context.xsd"> <!-- jpa configurations --> <jee:jndi-lookup id="mycontactdatasource" jndi-name="jdbc/tomcatdatasource" lookup-on-startup="false" proxy-interface="javax.sql.datasource"/> <bean id="transactionmanager" class="org.springframework.orm.jpa.jpatransactionmanager"/> <tx:annotation-driven transaction-manager="transactionmanager"/> <bean class="org.springframework.orm.jpa.support.persistenceannotationbeanpostprocessor"/> <bean id="entitymanagerfactory" class="org.springframework.orm.jpa.localcontainerentitymanagerfactorybean"> <property name="persistenceproviderclass" value="org.hibernate.ejb.hibernatepersistence"/> <property name="datasource" ref="mycontactdatasource"/> <property name="persistenceunitname" value="debtspu"/> <property name="persistencexmllocation" value="classpath:meta-inf/persistence.xml" /> </bean> <!-- spring data --> <jpa:repositories base-package="br.com.biologistica.debt.repository" entity-manager-factory-ref="entitymanagerfactory" transaction-manager-ref="transactionmanager"/>
and spring-security is:
<?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:security="http://www.springframework.org/schema/security" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd"> <security:global-method-security secured-annotations="enabled" /> <security:http auto-config="true"> <security:intercept-url pattern="/" access="permitall" /> <security:intercept-url pattern="/protected/**" access="isauthenticated()" /> <security:form-login login-page="/login" authentication-failure-url="/login?error=403" default-target-url="/protected/home" /> <security:logout invalidate-session="true" logout-success-url="/login" logout-url="/logout" /> </security:http> <security:authentication-manager> <security:authentication-provider> <security:jdbc-user-service data-source-ref="mycontactdatasource" users-by-username-query="select email, password, enabled system_user email = ?" authorities-by-username-query="select u.email login, u.user_role role system_user u u.email = ?" /> </security:authentication-provider> </security:authentication-manager> </beans>
database postgresql.
what seems issue here?
thanks in advance,
gtludwig
as mentioned in this post,use <http auto-config="true" use-expressions="true">
Comments
Post a Comment