aspose file tools*
The moose likes Spring and the fly likes Error Nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException WebFlow Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Error Nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException WebFlow" Watch "Error Nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException WebFlow" New topic
Author

Error Nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException WebFlow

Ricardo Llontop
Greenhorn

Joined: Apr 18, 2011
Posts: 11

Hi, I have a error like this working with webflow 2.3.0.RELEASE and richfaces 4.0.0.Final in jboss 7.0.1.FINAL:
12:16:46,989 INFO [stdout] (MSC service thread 1-7) 2011-09-20 12:16:46,987 [MSC service thread 1-7] ERROR (FrameworkServlet.java:314) � Context initialization failed 12:16:46,989 INFO [stdout] (MSC service thread 1-7) org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowExecutor': Cannot create inner bean '(inner bean)' of type [org.springframework.webflow.config.FlowExecutionListenerLoaderFactoryBean] while setting bean property 'flowExecutionListenerLoader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1':Cannot resolve reference to bean 'jpaFlowExecutionListener' while setting bean property 'listeners'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaFlowExecutionListener' defined in ServletContext resource [/WEB-INF/spring/transportes-webflow.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' is defined.

Well I suppose that the error is because I have the Hibernate configuracion in META-INF like this:
META-INF/spring/spring-master.xml
META-INF/spring/spring-hibernate.xml
META-INF/spring/spring-datasource.xml
META-INF/spring/jdbc.properties

and the webflow configuration in WEB-INF:
WEB-INF/spring/transportes-webflow.xml
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

When you get a Spring exception, the best way to read it is to scroll to the bottom and work your way up looking for the first caused by. That will give you your actual real problem. While you did not post your entire stack trace here for us to scroll to the bottom.

I can guess that near the bottom it says in the root caused by

No bean named 'entityManagerFactory' is defined.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Ricardo Llontop
Greenhorn

Joined: Apr 18, 2011
Posts: 11

Mark Spritzler wrote:When you get a Spring exception, the best way to read it is to scroll to the bottom and work your way up looking for the first caused by. That will give you your actual real problem. While you did not post your entire stack trace here for us to scroll to the bottom.

I can guess that near the bottom it says in the root caused by

No bean named 'entityManagerFactory' is defined.

Mark


Well I know this, this is my promt in rapishare, because I can't attached file txt or zip here.
https://rapidshare.com/files/335929555/prompt-jboss.zip
Everything work fine I have only that error.
Thanks.
Ricardo Llontop
Greenhorn

Joined: Apr 18, 2011
Posts: 11

Solved,
the error is in transportes-webflow.xml

constructor-arg ref="entityManagerFactory", is for jpa orm, I use hibernate (org.springframework.orm.hibernate3.HibernateTransactionManager), with sessionFactory, only change this and work:

sorry for the problems, thkns.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

Sweet.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error Nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException WebFlow