Factory Spring erro

opa galera desculpa o incomodo, porem to com uma dificuldade no spring, sera que vocês podem me ajudar?

application-model.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:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-2.5.xsd">

	 
	 <bean id="categoria" class="model.Categoria" />
	 <bean id="endereco" class="model.Endereco" />
	 <bean id="lance" class="model.Lance" />
	 <bean id="post" class="model.Post" />
	 <bean id="projeto" class="model.Projeto" />
	 <bean id="tipolance" class="model.TipoLance" />
	 <bean id="usuario" class="model.Usuario" />
</beans>

application-factorys.xml

[code]<?xml version="1.0" encoding="UTF-8"?>

application-model.xml [/code]

ServiceLocator.java

package utils;

import org.apache.commons.lang.NullArgumentException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.access.BeanFactoryLocator;
import org.springframework.beans.factory.access.BeanFactoryReference;
import org.springframework.context.access.ContextSingletonBeanFactoryLocator;
 
 
public class ServiceLocator {
	
	private static final ServiceLocator INSTANCE = new ServiceLocator();
		
	private final BeanFactoryReference factoryReference;
	
	
	private ServiceLocator() {
		BeanFactoryLocator factoryLocator = ContextSingletonBeanFactoryLocator.getInstance();
		factoryReference = factoryLocator.useBeanFactory("modelfactory");
		
	
	}
		
	public static ServiceLocator getInstance() {
		return INSTANCE;
	}
	
	public Object getObject(String name) {
		try {
			if (name == null) {
				throw new NullArgumentException("name");
			}
			BeanFactory factory = this.factoryReference.getFactory();
			return factory.getBean(name);
		} catch (RuntimeException exception) {
			throw exception;
		}
	}

}

Problema: não consigo fazer minha fabrica funcionar gostaria de ajuda para fazer isso.
ultimo erro que obtive :org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘modelfactory’ is defined.
status: atualmente estou acessando a classe via scriplet mesmo só para testes.

desde já muito obrigado a todos :smiley: .

ao acessar o console mostra a seguinte menssagem:

14:54:43,106 INFO [STDOUT] 2009-09-21 14:54:43,106 [http-localhost%2F127.0.0.1-8080-1] INFO org.springframework.context.support.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@15cda11: display name [org.springframework.context.support.ClassPathXmlApplicationContext@15cda11]; startup date [Mon Sep 21 14:54:43 GMT-03:00 2009]; root of context hierarchy
14:54:43,112 INFO [STDOUT] 2009-09-21 14:54:43,112 [http-localhost%2F127.0.0.1-8080-1] INFO org.springframework.context.support.ClassPathXmlApplicationContext - Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@15cda11]: org.springframework.beans.factory.support.DefaultListableBeanFactory@f8f6d0
14:54:43,113 INFO [STDOUT] 2009-09-21 14:54:43,113 [http-localhost%2F127.0.0.1-8080-1] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@f8f6d0: defining beans []; root of factory hierarchy
14:54:43,147 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘modelfactory’ is defined

web xml:

[code]<?xml version="1.0" encoding="UTF-8"?>

Lance Digital

org.apache.struts2.tiles.StrutsTilesListener
 <!--  Listner Spring -->
org.springframework.web.context.ContextLoaderListener contextConfigLocation WEB-INF/classes/application-factorys.xml WEB-INF/classes/applicationContext.xml WEB-INF/classes/application-aspectos.xml WEB-INF/classes/application-daos.xml WEB-INF/classes/application-services.xml WEB-INF/classes/application-actions.xml WEB-INF/classes/application-security.xml WEB-INF/classes/application-model.xml org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG /WEB-INF/classes/tiles.xml struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /* /principal.action BASIC [/code]

Resolvido

Resposta que obtive no Forum http://forum.springsource.org:

chelu

Hi,
Try with ContextSingletonBeanFactoryLocator.getInstance(“ap plication-factorys.xml
”) or change application-factorys.xml to default selector name beanRefFactory.xml