Spring context not started !!
rmcalderero.rmcalderero.wanadoo.es Mar 6, 2008 2:36 PMHi. I cant make seam start an spring application context. I have reduced the problem to a minimal configuration but still dont works.
applicationContext.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:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"> <bean id="servicioSpring" class="org.fundacionctic.tawmonitor.servicios.ServicioSpring" init-method="init"/> </beans>
components.xml
<?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:mail="http://jboss.com/products/seam/mail" xmlns:jms="http://jboss.com/products/seam/jms" xmlns:persistence="http://jboss.com/products/seam/persistence" xmlns:transaction="http://jboss.com/products/seam/transaction" xmlns:security="http://jboss.com/products/seam/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:async="http://jboss.com/products/seam/async" xmlns:spring="http://jboss.com/products/seam/spring" xsi:schemaLocation= "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd http://jboss.com/products/seam/spring http://jboss.com/products/seam/spring-2.1.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd"> <!-- Parametros generales de configuración --> <core:init debug="true"/> <core:manager conversation-timeout="300000" concurrent-request-timeout="500" conversation-id-parameter="cid" /> <spring:context-loader context-locations="/WEB-INF/applicationContext.xml"/> ................
Class ServicioSpring
package org.fundacionctic.tawmonitor.servicios; import org.apache.log4j.Logger; public class ServicioSpring { private static Logger logger = Logger.getLogger(ServicioSpring.class); public void init() { System.out.println("+++++++++++++++++ Se inicia el ServicioSpring"); } }
Seam writes in the log the inicialization of all the components of the application (seam-2.0.0.GA, tomcat 6) but nothing about the spring app context. The message in the init method of the bean is not logged either. Are we missing something?