• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cannot resolve reference to bean

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

During the deployment process, liferay thrown following error:

05:35:49,588 INFO [DispatcherPortlet:98] Initializing portlet 'questionair'
-05:35:49,643 INFO [DispatcherPortlet:263] FrameworkPortlet 'questionair': initialization started
05:35:49,667 INFO [XmlPortletApplicationContext:456] Refreshing PortletApplicationContext for namespace 'questionair-portlet': startup date [Wed Jul 06 05:35:49 GMT 2011]; root of context hierarchy
05:35:49,723 INFO [XmlBeanDefinitionReader:315] Loading XML bean definitions from PortletContext resource [/WEB-INF/sql/loader.xml]

05:35:49,840 INFO [PropertyPlaceholderConfigurer:177] Loading properties file from file [/usr/home/liferay/ixsystems_portal/liferay-portal-5.2-ee-sp4/tomcat/temp/11-questionair-service-impl-1.0.0-SNAPSHOT/WEB-INF/classes/META-INF/spring/loader.properties]
05:35:49,840 INFO [PropertyPlaceholderConfigurer:177] Loading properties file from file [/usr/home/liferay/ixsystems_portal/liferay-portal-5.2-ee-sp4/tomcat/temp/11-questionair-service-impl-1.0.0-SNAPSHOT/WEB-INF/classes/META-INF/spring/database.properties]
05:35:49,849 INFO [DefaultListableBeanFactory:555] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@769b2c24: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,com.questionair.loader.LoaderConfiguration#0,com.questionair.loader.QuestionsLoader#0]; root of factory hierarchy
05:35:49,875 INFO [DefaultListableBeanFactory:422] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@769b2c24: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,com.questionair.loader.LoaderConfiguration#0,com.questionair.loader.QuestionsLoader#0]; root of factory hierarchy
05:35:49,876 ERROR [DispatcherPortlet:276] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.questionair.loader.QuestionsLoader#0' defined in PortletContext resource [/WEB-INF/sql/loader.xml]: Cannot resolve reference to bean 'questionDAO' while setting bean property 'questionDAO'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'questionDAO' is defined
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCap
...
...




Here is my web.xml file:



portlet.xml file:



loader.xml file:



aplicationContext.xml file:



There must be something missing in my spring /portlet setup.

Any suggestion is very appreciated.

Thanks
sam
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic