struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <grobme...@apache.org>
Subject LocaleProvder not unique
Date Mon, 13 Mar 2017 15:02:28 GMT
Hello all,

I trying to upgrade my Struts app from 2.5.1 to 2.5.10.1.

I saw there are some changes in I18nInterceptor like that:
https://github.com/apache/struts/commit/ea92e95461386f1ddfda37bb09ec170b8e306ae7#diff-f9eff9d34d35d47f349c7fa0531e51bdR130

My actions extend from ActionSupport, which is implementing
LocaleProvider.
I am also using Spring for DI.

Unfortunately I now get this exception when starting the container:

 SpringObjectFactory            - Error building bean
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name
'org.apache.struts2.interceptor.I18nInterceptor': Unsatisfied dependency
expressed through bean property 'localeProvider': : No qualifying bean
of type [com.opensymphony.xwork2.LocaleProvider] is defined: expected
single matching bean but found 95: emptyAction, ...

It lists all my actions and it seems as Spring would try to instantiate
I18nInterceptor after my actions.

Does anybody else experience that or got an idea how to improve my code?

Thanks

Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message