aspose file tools*
The moose likes Spring and the fly likes migrate a project from spring 2.5 Jboss 4.2.3 to jboss 6, a NoSuchBeanDefinitionException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "migrate a project from spring 2.5 Jboss 4.2.3 to jboss 6, a NoSuchBeanDefinitionException" Watch "migrate a project from spring 2.5 Jboss 4.2.3 to jboss 6, a NoSuchBeanDefinitionException" New topic
Author

migrate a project from spring 2.5 Jboss 4.2.3 to jboss 6, a NoSuchBeanDefinitionException

shihong li
Greenhorn

Joined: Jan 26, 2010
Posts: 1
hi, guys. I run into a tough problem recently. a Project needs to be migrated from previous jboss 4.2 to jboss 6. it is developed using Hibernate 3, Spring 2.5, Axis 2, Jboss 4.2.3.etc. Everything is going well on that platform. As I tried to migrate the whole project to Jboss 6, while deploying, a series of errors and excepts are comping up. I checked a couple of posts on other forums, no luck, seems like not fitting my problem

--------------------------------------------------------------------------------
15:54:41,988 ERROR [ContextLoader] Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowRegistry': Cannot resolve reference to bea
n 'facesFlowBuilderServices' while setting bean property 'flowBuilderServices'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'facesFlowBui
lderServices': Cannot resolve reference to bean 'conversionService' while setting bean property 'conversionService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException
: No bean named 'conversionService' is defined

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'facesFlowBuilderServices': Cannot resolve reference to bean 'conversionService' while setting bean pr
operty 'conversionService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'conversionService' is defined

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'conversionService' is defined



------------------------------------------------------
spring context file -- web-application-config.xml


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:webflow="http://www.springframework.org/schema/webflow-config"
xmlns:faces="http://www.springframework.org/schema/faces"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd
http://www.springframework.org/schema/faces
http://www.springframework.org/schema/faces/spring-faces-2.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-2.0.2.xsd">

<context:component-scan base-package="de.concretelogic.witamin.srv.gui"/>


<!-- The registry of executable flow definitions -->
<webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices" base-path="/WEB-INF/flows">
<webflow:flow-location-pattern value="/**/*-flow.xml" />
</webflow:flow-registry>

<!-- Maps request URIs to controllers -->
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<value>
/intro=flowController
/security_error=flowController
/system_status=flowController
/search_orders=flowController
/search_messages=flowController
/search_changes=flowController
/change_history_order_view=flowController
/change_history_message_view=flowController
/search_issues=flowController
/clearing_overview=flowController
/recent_changes=flowController
/user_management=flowController
/client_management=flowController
/carrier_management=flowController
/download=defaultController
/show_settings=flowController
</value>
</property>
<property name="defaultHandler">
<!-- Selects view names to render based on the request URI: e.g. /main selects "main" -->
<bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController" />
</property>
</bean>

<!-- Maps logical view names to Facelet templates in /WEB-INF (e.g. 'search' to '/WEB-INF/search.xhtml' -->
<bean id="faceletsViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.faces.mvc.JsfView"/>
<property name="prefix" value="/WEB-INF/" />
<property name="suffix" value=".xhtml" />
</bean>

<!-- Handles requests mapped to the Spring Web Flow system -->
<bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
<property name="flowExecutor" ref="flowExecutor"/>
</bean>

<bean id="defaultController" class="de.concretelogic.witamin.srv.gui.MyMultiActionController">
<property name="methodNameResolver">
<bean class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver">
<property name="mappings">
<props>
<prop key="/download">downloadHandler</prop>
</props>
</property>
</bean>
</property>
</bean>

<!-- Executes flows: the central entry point into the Spring Web Flow system -->
<webflow:flow-executor id="flowExecutor">
<webflow:flow-execution-listeners>
<webflow:listener ref="securityFlowExecutionListener" />
</webflow:flow-execution-listeners>
</webflow:flow-executor>

<!-- Configures the Spring Web Flow JSF integration -->
<faces:flow-builder-services id="facesFlowBuilderServices" conversion-service="conversionService" />

<!-- Configure Spring Security -->
<security:http auto-config="true">
<security:form-login login-page="/spring/login" login-processing-url="/spring/loginProcess" always-use-default-target="true" default-target-url="/spring/intro" authentication-failure-url="/spring/login?login_error=1" />
<security:logout logout-url="/spring/logout" logout-success-url="/spring/logoutSuccess" />
</security:http>

<security:authentication-provider user-service-ref="userService">
<security:password-encoder hash="md5" />
</security:authentication-provider>

<bean id="securityFlowExecutionListener" class="org.springframework.webflow.security.SecurityFlowExecutionListener" />

</beans>



--------------------------------------------------
web.xml

<display-name>witamin</display-name>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>


<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/conf/web-application-config.xml
</param-value>
</context-param>

.................

-------------------------------------------

because i am new to Spring, a post I saw said, Spring 2.5 is incompitable with Jboss 6. the only way is to update Spring 3.0. if anyone can help me out, really apprieciate.

lee


Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

You could just use Spring 3.0 jars instead of the Spring 2.5 jars. It is backwards compatible.

The error states that it does not find a bean called ConversionService. This class is part of Spring 3.0.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: migrate a project from spring 2.5 Jboss 4.2.3 to jboss 6, a NoSuchBeanDefinitionException