java - Migrate from WebSphere to Tomcat 7, No unique bean of type [com.m.g.tenancy.ITenantPlaceholderResolver] is defined: expected single bean but found 0 -
i'm relatively new spring , tomcat, attempting migrate web application websphere tomcat 7. i'm running many issues along way , tackling them 1 one. right i'm looking @ error , stumped:
15:05:15.362 [localhost-startstop-1] error c.m.g.t.tenantdispatcherservlet - not add tenant dc.hkg.sales.vnm, details org.springframework.beans.factory.nosuchbeandefinitionexception: no unique bean of type [com.m.gsp.tenancy.itenantplaceholderresolver] defined: expected single bean found 0:
this application worked in websphere , made 1 change xml files, tenant-context.xml contained line:
<import resource="classpath:/web-inf/core-context.xml" />
core-context.xml not found, changed to:
<import resource="classpath*:web-inf/core-context.xml" />
and appears core-context.xml can found above nosuchbeandefinitionexception
. ideas?
m. deinum's comment pointed me in right direction, ended creating enviornment variable pointed web-inf
directory.
in eclipse can accomplished double-clicking tomcat server in servers view, clicking 'open launch conifguration', , adding variable in 'enviornment' tab. variable set so:
webinfdir = file:/apache-tomcat-7.0.57/wtpwebapps/m-gsp-web/web-inf
then referenced variable in place of classpath
<import resource="${webinfdir}/core-context.xml" />
thanks input, everyone.
Comments
Post a Comment