Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Splring: ContextLoaderListener not working  RSS feed

Nina Anderson
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I'm using the springframeWork to initialize my hiberate classes which are location in my /WEB-INF/applicationContext.xml. However, when I try to start up my server, my strut action classes configuration in ContextLoaderPlugIn cannot find the bean classes defined in the applicationContext.

The following is the error I'm getting:
[9/15/07 3:49:14:421 PDT] 00000018 WebExtensionP W Servlet action_tmp is currently unavailable: null
[9/15/07 3:49:16:187 PDT] 00000018 WebApp A SRVE0180I: [PBTest#PBWebApp.war] [/PBWebApp] [Servlet.LOG]: Initializing WebApplicationContext for Struts ActionServlet 'action', module ''
[9/15/07 3:49:16:281 PDT] 00000018 WebApp A SRVE0181I: [PBTest#PBWebApp.war] [/PBWebApp] [Servlet.LOG]: action: null: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/displayAddImages' defined in ServletContext resource [/WEB-INF/presentationContext.xml]: Cannot resolve reference to bean 'businessBS' while setting bean property 'businessBS'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'businessBS' is defined

Here's my code:

<!-- =================== Define Spring Bean Definition Files to be loaded ================== -->



<!-- =================== Spring Context Loader Servlet ================== -->

///APPLiCATION Context.xml /////

<bean id="businessBSTarget" class="">
<property name="businessDao"><ref local="businessDao" /></property>
<bean id="businessBS" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<property name="target">
<ref local="businessBSTarget" />
<property name="interceptorNames">


<!-- ============================= Spring Plugin ================================== -->

<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">

/////////Action bean context: presentationContext.xml ////////

<bean name="/displayAddImages" class="com.poshWebApp.action.AddImageDisplayAction">
<property name="businessBS"><ref bean="businessBS" /></property>
<property name="paymentProcessBS"><ref bean="paymentProcessBS" /></property>

Christophe Verré
Posts: 14691
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wonder if it could be related with the following bug :

Try using this instead:
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!