aspose file tools*
The moose likes Portals and Portlets and the fly likes Cannot resolve reference to bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Cannot resolve reference to bean" Watch "Cannot resolve reference to bean" New topic
Author

Cannot resolve reference to bean

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 208
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot resolve reference to bean