4 Replies Latest reply on Feb 10, 2010 10:47 PM by Kariem Hussein

    seam 2.2.0 + spring 2.5.6 problem

    Gilles Dupont Tagne Tagne Newbie
      Hi guys,

      I am trying to integrate a seam war project with spring but. It doesn't work.

      First of all a create the file camel-context.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:seam="http://jboss.com/products/seam/spring-seam" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="
              http://jboss.com/products/seam/spring-seam http://jboss.com/products/seam/spring-seam-2.2.xsd
             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
             http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">

           <camelContext xmlns="http://camel.apache.org/schema/spring">

                <route>
                     <from uri="jbossmessaging:queue:portalEingangQueue?selector=operation%3D'refresh'"/>
                     <to uri="bean:empfaengerBean?method=gibaus"/>
                </route> 
           </camelContext>
           
           <bean id="empfaengerBean" class="de.cimt.portal.service.EmpfaengerAdresseTest" scope="prototype">
                <seam:component auto-create="true"/>
           </bean>
           
           
           <bean id="jbossmessaging" class="org.apache.camel.component.jms.JmsComponent">
                <property name="connectionFactory" ref="myConnectionFactory" />
           </bean>

           <bean id="myConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiName" value="ConnectionFactory" />
                <property name="jndiTemplate" ref="jndiTemplate" />
           </bean>

           <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
                <property name="environment">
                     <props>
                          <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
                          <prop key="java.naming.provider.url">jnp://localhost:1099</prop>
                     </props>
                </property>
           </bean>
      </beans>

      Here is the bean class EmpfaengerAdresseTest

      /**
      *
      */
      package de.cimt.portal.service;

      import org.apache.camel.Body;
      import org.apache.camel.Exchange;
      import org.jboss.seam.annotations.Create;
      import org.jboss.seam.annotations.Logger;
      import org.jboss.seam.log.Log;

      import de.cimt.portal.model.Adresse;

      /**
      * @author gilles Dupont Tagne Tagne
      *
      */

      public class EmpfaengerAdresseTest {

           @Logger
           Log log;
           
           public void gibaus(@Body Adresse adresse){
                
                log.info("Die Methode 'gibaus' wird ausgeführt.");

                System.out.println("Kunde Nummer: " + adresse.getKundeNr());
                System.out.println("Email: " + adresse.getEmail());
                System.out.println("Festnetz Nummer: " + adresse.getFestnetzNr());
                System.out.println("Handy Nummer: " + adresse.getHandyNr());
                System.out.println("Strasse: " + adresse.getStrasse());
                System.out.println("Postleitzahl: " + adresse.getPlz());
                System.out.println("Ort: " + adresse.getStadt());
                System.out.println("Land: " + adresse.getLand());
                System.out.println("Laendercode: " + adresse.getLaenderCode());
                
           }
           
           
      }

      when i put a message in the queue/portalEingangQueue with the selector operation='refresh', i have this error

      16:55:00,336 ERROR [EndpointMessageListener] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'empfaengerBean' defined in ServletContext resource [/WEB-INF/camel-context.xml]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: No application context active
      org.apache.camel.RuntimeCamelException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'empfaengerBean' defined in ServletContext resource [/WEB-INF/camel-context.xml]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: No application context active
           at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1039)
           at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)
           at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:543)
           at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)
           at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451)
           at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
           at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
           at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
           at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
           at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
           at java.lang.Thread.run(Thread.java:637)
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'empfaengerBean' defined in ServletContext resource [/WEB-INF/camel-context.xml]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: No application context active
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
           at java.security.AccessController.doPrivileged(Native Method)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
           at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
           at org.apache.camel.spring.spi.ApplicationContextRegistry.lookup(ApplicationContextRegistry.java:52)
           at org.apache.camel.component.bean.RegistryBean.lookupBean(RegistryBean.java:125)
           at org.apache.camel.component.bean.RegistryBean.getBean(RegistryBean.java:56)
           at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:72)
           at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:95)
           at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:65)
           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
           at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
           at org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
           at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
           at org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
           at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:223)
           at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:153)
           at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:91)
           at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
           at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:206)
           at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
           at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:83)
           ... 9 more
      Caused by: java.lang.IllegalStateException: No application context active
           at org.jboss.seam.Component.forName(Component.java:1945)
           at org.jboss.seam.Component.getInstance(Component.java:2005)
           at org.jboss.seam.Component.getInstance(Component.java:2000)
           at org.jboss.seam.Component.getInstance(Component.java:1994)
           at org.jboss.seam.Component.getInstance(Component.java:1989)
           at org.jboss.seam.ioc.spring.SeamComponentPostProcessor.postProcessAfterInitialization(SeamComponentPostProcessor.java:49)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:361)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1344)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
           ... 41 more
      16:55:00,338 WARN  [DefaultMessageListenerContainer] Execution of JMS message listener failed
      org.apache.camel.RuntimeCamelException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'empfaengerBean' defined in ServletContext resource [/WEB-INF/camel-context.xml]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: No application context active
           at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1039)
           at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)
           at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:543)
           at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)
           at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451)
           at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
           at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
           at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
           at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
           at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
           at java.lang.Thread.run(Thread.java:637)
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'empfaengerBean' defined in ServletContext resource [/WEB-INF/camel-context.xml]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: No application context active
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
           at java.security.AccessController.doPrivileged(Native Method)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
           at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
           at org.apache.camel.spring.spi.ApplicationContextRegistry.lookup(ApplicationContextRegistry.java:52)
           at org.apache.camel.component.bean.RegistryBean.lookupBean(RegistryBean.java:125)
           at org.apache.camel.component.bean.RegistryBean.getBean(RegistryBean.java:56)
           at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:72)
           at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:95)
           at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:65)
           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
           at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
           at org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
           at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
           at org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
           at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:223)
           at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:153)
           at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:91)
           at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
           at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:206)
           at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
           at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:83)
           ... 9 more
      Caused by: java.lang.IllegalStateException: No application context active
           at org.jboss.seam.Component.forName(Component.java:1945)
           at org.jboss.seam.Component.getInstance(Component.java:2005)
           at org.jboss.seam.Component.getInstance(Component.java:2000)
           at org.jboss.seam.Component.getInstance(Component.java:1994)
           at org.jboss.seam.Component.getInstance(Component.java:1989)
           at org.jboss.seam.ioc.spring.SeamComponentPostProcessor.postProcessAfterInitialization(SeamComponentPostProcessor.java:49)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:361)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1344)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
           ... 41 more
        • 1. Re: seam 2.2.0 + spring 2.5.6 problem
          Nikos Paraskevopoulos Novice

          A wild guess since I have never used both Seam+Spring: have you installed Spring's servlet filter in web.xml?


          Have you double-checked that the required configuration is done correctly?

          • 2. Re: seam 2.2.0 + spring 2.5.6 problem
            Gilles Dupont Tagne Tagne Newbie

            Thanks Nikos for the answer, I will show you all the configuration files


            camel-context.xml


            <?xml version="1.0" encoding="UTF-8"?>
            <beans xmlns="http://www.springframework.org/schema/beans"
             xmlns:seam="http://jboss.com/products/seam/spring-seam" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="
                http://jboss.com/products/seam/spring-seam http://jboss.com/products/seam/spring-seam-2.2.xsd
                   http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                   http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
            
             <camelContext xmlns="http://camel.apache.org/schema/spring">
            
              <route>
               <from uri="jbossmessaging:queue:portalEingangQueue?selector=operation%3D'refresh'"/>
               <to uri="bean:empfaengerBean?method=gibaus"/>
              </route>
             </camelContext>
               <bean id="empfaengerBean" class="de.cimt.portal.service.EmpfaengerAdresseTest" scope="prototype">
              <seam:component auto-create="true"/>
             </bean>
                   <bean id="jbossmessaging" class="org.apache.camel.component.jms.JmsComponent">
              <property name="connectionFactory" ref="myConnectionFactory" />
             </bean>
            
             <bean id="myConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
              <property name="jndiName" value="ConnectionFactory" />
              <property name="jndiTemplate" ref="jndiTemplate" />
             </bean>
            
             <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
              <property name="environment">
               <props>
                <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
                <prop key="java.naming.provider.url">jnp://localhost:1099</prop>
               </props>
              </property>
             </bean>
            </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:persistence="http://jboss.com/products/seam/persistence"
                 xmlns:drools="http://jboss.com/products/seam/drools" xmlns:bpm="http://jboss.com/products/seam/bpm"
                 xmlns:security="http://jboss.com/products/seam/security" xmlns:mail="http://jboss.com/products/seam/mail"
                 xmlns:spring="http://jboss.com/products/seam/spring" xmlns:web="http://jboss.com/products/seam/web"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd
                             http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd
                             http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd
                             http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd
                             http://jboss.com/products/seam/spring http://jboss.com/products/seam/spring-2.2.xsd
                             http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd
                             http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd
                             http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd
                             http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd">
            
                 <core:init debug="true" jndi-pattern="@jndiPattern@" />
            
                 <core:manager concurrent-request-timeout="500"
                      conversation-timeout="120000" conversation-id-parameter="cid"
                      parent-conversation-id-parameter="pid" />
            
                 <!--
                      Make sure this URL pattern is the same as that used by the Faces
                      Servlet
                 -->
                 <web:hot-deploy-filter url-pattern="*.seam" />
            
                 <persistence:entity-manager-factory
                      name="entityManagerFactory" persistence-unit-name="portal" />
            
                 <persistence:managed-persistence-context
                      name="entityManager" auto-create="true" entity-manager-factory="#{entityManagerFactory}" />
            
                 <drools:rule-base name="securityRules">
                      <drools:rule-files>
                           <value>/security.drl</value>
                      </drools:rule-files>
                 </drools:rule-base>
            
                 <security:rule-based-permission-resolver
                      security-rules="#{securityRules}" />
            
                 <security:identity authenticate-method="#{authenticator.authenticate}"
                      remember-me="true" />
            
                 <event type="org.jboss.seam.security.notLoggedIn">
                      <action execute="#{redirect.captureCurrentView}" />
                 </event>
                 <event type="org.jboss.seam.security.loginSuccessful">
                      <action execute="#{redirect.returnToCapturedView}" />
                 </event>
            
                 <mail:mail-session host="localhost" port="25" />
            
                 <!-- For use with jBPM pageflow or process management -->
                 <!--
                      <bpm:jbpm> <bpm:process-definitions></bpm:process-definitions>
                      <bpm:pageflow-definitions></bpm:pageflow-definitions> </bpm:jbpm>
                 -->
                 <spring:context-loader config-locations="/WEB-INF/camel-context.xml" />
            
            </components>



            web.xml


            <?xml version="1.0" encoding="UTF-8"?>
            <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
              <display-name>portal</display-name>
              <welcome-file-list>
                <welcome-file>index.html</welcome-file>
                <welcome-file>index.htm</welcome-file>
                <welcome-file>index.jsp</welcome-file>
                <welcome-file>default.html</welcome-file>
                <welcome-file>default.htm</welcome-file>
                <welcome-file>default.jsp</welcome-file>
              </welcome-file-list>
              <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
              </servlet>
              <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.seam</url-pattern>
              </servlet-mapping>
              <context-param>
                <param-name>org.richfaces.SKIN</param-name>
                <param-value>blueSky</param-value>
              </context-param>
              <listener>
                <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
              </listener>
              <filter>
                <filter-name>Seam Filter</filter-name>
                <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
              </filter>
              <filter-mapping>
                <filter-name>Seam Filter</filter-name>
                <url-pattern>/*</url-pattern>
              </filter-mapping>
              <servlet>
                <servlet-name>Seam Resource Servlet</servlet-name>
                <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
              </servlet>
              <servlet-mapping>
                <servlet-name>Seam Resource Servlet</servlet-name>
                <url-pattern>/seam/resource/*</url-pattern>
              </servlet-mapping>
              <context-param>
                <param-name>facelets.DEVELOPMENT</param-name>
                <param-value>true</param-value>
              </context-param>
              <context-param>
                <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                <param-value>.xhtml</param-value>
              </context-param>
              <security-constraint>
                <display-name>Restrict raw XHTML Documents</display-name>
                <web-resource-collection>
                  <web-resource-name>XHTML</web-resource-name>
                  <url-pattern>*.xhtml</url-pattern>
                </web-resource-collection>
                <auth-constraint/>
              </security-constraint>
            </web-app>



            faces-config.xml


            <?xml version="1.0" encoding="UTF-8"?>
            
            <faces-config
                xmlns="http://java.sun.com/xml/ns/javaee"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
                version="1.2">
                 <application>
                      <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
                      <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
                      <locale-config>
                           <default-locale>en</default-locale>
                           <supported-locale>bg</supported-locale>
                           <supported-locale>de</supported-locale>
                           <supported-locale>en</supported-locale>
                           <supported-locale>fr</supported-locale>
                           <supported-locale>tr</supported-locale>
                      </locale-config>
                 </application>
            
            </faces-config>
            


            I don't know what i am doing wrong.







            • 3. Re: seam 2.2.0 + spring 2.5.6 problem
              Gilles Dupont Tagne Tagne Newbie

              The bean class


              /**
               * 
               */
              package de.cimt.portal.service;
              
              import org.apache.camel.Body;
              import org.apache.camel.Exchange;
              import org.jboss.seam.annotations.Create;
              import org.jboss.seam.annotations.Logger;
              import org.jboss.seam.log.Log;
              
              import de.cimt.portal.model.Adresse;
              
              /**
               * @author gilles Dupont Tagne Tagne
               *
               */
              
              public class EmpfaengerAdresseTest {
              
                   @Logger
                   Log log;
                   
                   public void gibaus(@Body Adresse adresse){
                        
                        log.info("Die Methode 'gibaus' wird ausgeführt.");
              
                        System.out.println("Kunde Nummer: " + adresse.getKundeNr());
                        System.out.println("Email: " + adresse.getEmail());
                        System.out.println("Festnetz Nummer: " + adresse.getFestnetzNr());
                        System.out.println("Handy Nummer: " + adresse.getHandyNr());
                        System.out.println("Strasse: " + adresse.getStrasse());
                        System.out.println("Postleitzahl: " + adresse.getPlz());
                        System.out.println("Ort: " + adresse.getStadt());
                        System.out.println("Land: " + adresse.getLand());
                        System.out.println("Laendercode: " + adresse.getLaenderCode());
                        
                   }
                   
                   
              }
              



              • 4. Re: seam 2.2.0 + spring 2.5.6 problem
                Kariem Hussein Newbie

                It looks to me as if the execution is triggered from a spring JMS listener. As this thread never really touches Seam, the Seam context cannot be active. That means that the bean definition for empfaengerBean will throw an error message on initializing the instance as soon as it tries to bind to the context when encountering the <seam:component> tag.