struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hesham" <hesham.ta...@asset.com.eg>
Subject Inject Problem
Date Sun, 02 Nov 2008 15:18:14 GMT
Hi, I am having trouble injecting the Struts2 configuration manager into my
action using the following code:

    @Inject
    public void setConfigurationManager(ConfigurationManager
configurationManager) {
    this.configurationManager = configurationManager;
    }

This is the stack trace:

com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No
mapping found for dependency
[type=com.opensymphony.xwork2.config.ConfigurationManager,
name='com.opensymphony.xwork2.config.ConfigurationManager'] in public void
com.asset.jupiter.portal.actions.UpdateContentAction.setConfigurationManager
(com.opensymphony.xwork2.config.ConfigurationManager).
	
com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(Contain
erImpl.java:239)
	
com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(Containe
rImpl.java:229)
	
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.<init>(Container
Impl.java:282)
	
com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:130
)
	
com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:128
)
	
com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(Containe
rImpl.java:154)
	
com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(Containe
rImpl.java:126)
	
com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java
:103)
	
com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:84)
	
com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:82)
	
com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(Refer
enceCache.java:155)
	java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
	java.util.concurrent.FutureTask.run(FutureTask.java:123)
	
com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceC
ache.java:81)
	
com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:1
21)
	
com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:452)
	
com.opensymphony.xwork2.inject.ContainerImpl$6.call(ContainerImpl.java:492)
	
com.opensymphony.xwork2.inject.ContainerImpl$6.call(ContainerImpl.java:491)
	
com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.jav
a:542)
	
com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:490)
	
com.opensymphony.xwork2.ObjectFactory.injectInternalBeans(ObjectFactory.java
:131)
	
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:156)
	
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:143)
	
com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:113)
	
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionIn
vocation.java:275)
	
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation
.java:365)
	
com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvo
cation.java:38)
	
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:83)
	
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:455)
	
com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocati
on.java:74)
	
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:1
89)
	
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsAct
ionProxyFactory.java:41)
	
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)
	
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.jav
a:419)

If anyone has any ideas, I'd be very greatful

Best Regards,
Hesham Tarek Ahmed


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


Mime
View raw message