You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by ajainy <aj...@hotmail.com> on 2011/04/23 00:30:02 UTC

Any idea of this error?

I am trying to bring up spring context up, but getting this error:

Caused by: org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name
'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': 
Initialization of bean failed; nested exception is
org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name
'org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#0'
defin
ed in class path resource [applicationContext-common.xml]: Unsatisfied
dependency expressed through bean property 'advice': : No unique bean
 of type [org.aopalliance.aop.Advice] is defined: expected single matching
bean but found 2: [org.springframework.cache.interceptor.CacheInt
erceptor#0,
org.springframework.transaction.interceptor.TransactionInterceptor#0];
nested exception is org.springframework.beans.factory.NoS
uchBeanDefinitionException: No unique bean of type
[org.aopalliance.aop.Advice] is defined: expected single matching bean but
found 2: [org.
springframework.cache.interceptor.CacheInterceptor#0,
org.springframework.transaction.interceptor.TransactionInterceptor#0]


--
View this message in context: http://shiro-user.582556.n2.nabble.com/Any-idea-of-this-error-tp6298315p6298315.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Any idea of this error?

Posted by Eduard Neuwirt <ed...@googlemail.com>.
Hi,

it is a spring related problem. You have two beans with the same interface.
So spring IOC canot decide which one to take. Try with explicit
initialization and not autowiring.

Regards
Eduard

--
View this message in context: http://shiro-user.582556.n2.nabble.com/Any-idea-of-this-error-tp6298315p6302106.html
Sent from the Shiro User mailing list archive at Nabble.com.