Spring Security Warning: Class AuthorityUtils is abstract?

With the transition to Spring Security 3.2.5.RELEASE and Spring 4.1.1.RELEASE, we get a Spring Bean warning in Eclipse (Luna).

Exact warning:

Class 'org.springframework.security.core.authority.AuthorityUtils' is abstract

Here is the header of this Spring file:

 <?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:tx="http://www.springframework.org/schema/tx" xmlns:springsecurity="http://www.springframework.org/schema/security" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:cxf="http://cxf.apache.org/core" xmlns:jee="http://www.springframework.org/schema/jee" xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.1.xsd http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd"> 

The violating part of the configuration is as follows (this means that if I delete this section, the error will disappear. In particular, if I delete the line springsecurity:authentication-provider :

 <springsecurity:authentication-manager alias="authenticationManager"> <springsecurity:authentication-provider> <springsecurity:user-service> <springsecurity:user name="john" password="john" authorities="ROLE_USER" /> <springsecurity:user name="admin" password="admin" authorities="ROLE_USER, ROLE_ADMIN" /> <springsecurity:user name="guest" password="guest" authorities="ROLE_GUEST" /> </springsecurity:user-service> </springsecurity:authentication-provider> </springsecurity:authentication-manager> 

Any ideas on the root cause of this? Our project does not tolerate false warnings, and I do not want to disable Spring Bean validation.

+7
java spring xml spring-security configuration
source share
1 answer

This is a bug in version 3.6.0 of the Spring toolkit, as Luke Taylor noted. The error report is located at https://issuetracker.springsource.com/browse/STS-3875 and will not be fixed until STS version 3.6.3. You can check the code for this class at http://www.docjar.com/html/api/org/springframework/orm/jpa/SharedEntityManagerCreator.java.html

[Edit] The error report indicates that this error has now been fixed. The fix is ​​in version 3.6.4

+3
source share

All Articles