I am trying basic spring security set up. I am using 3.1.0.RELEASE I have in the spring security xml as follows:
<security:http auto-config='true'>
<security:intercept-url pattern="/**" access="ROLE_USER" />
</security:http>
<security:authentication-manager>
<security:authentication-provider>
<security:user-service>
<security:user name="jimi" password="jimispassword" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="bob" password="bobspassword" authorities="ROLE_USER" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
When I access the start page , I get the following exception: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.security.filterChains': Initialization of bean failed; nested exception is java.lang.NoSuchFieldError: NULL.
Can any one help me?
The actual cause of the problem seems to be that spring-security 3.1.0 pulls in older versions of spring which create a silent conflict. In my case spring-security-3.1.0.RELEASE pulled in spring-aop, spring-jdbc, spring-tx and spring-expression 3.0.6 but I was using spring 3.1.0.RELEASE. After adding these dependencies explicitly the problem went away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With