0

I have an application with JSF 2.2 and Spring 4.3 with these components: web-module, service-module, service-module-interface and ear.

  1. In the service-module I have configured a SpringConfiguration class.
  2. In ear I have included the web-module and service-module
  3. The web-module has a dependency with service-module-interface (they are the interfaces of the spring @Service class in service-module). Below the a snippet of web.xml:

     <context-param>
      <param-name>contextClass</param-name>
      <param-value>         org.springframework.web.context.support.AnnotationConfigWebApplicationContext
      </param-value>
    

     <context-param> <!-- my spring configuration class -->
      <param-name>contextConfigLocation</param-name>
      <param-value>com.ipdb.datamodel.conf.SpringConfiguration</param-value>
    

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

I cannot to inject with @Autowired in a Backing Bean in web module. I have this error: No qualifying bean of type. Can you help me, please?

Michel Foucault
  • 1,724
  • 3
  • 25
  • 48
  • Your web.xml is not welformed xml. `context-param` is not closed. `listener-class` is not within `listener`, for example. Regardless of all that, why do you need to mix JavaEE and Spring? (my personall opinion :-)) – ujulu Jul 23 '16 at 15:52
  • In application the web.xml is well formed. I want inject the spring service in Backing bean. – Michel Foucault Jul 23 '16 at 15:57
  • 1
    [This](http://www.concretepage.com/spring-4/spring-4-jsf-2-integration-example-using-autowired-annotation) example might help to integrate Spring and JSF. Good luck :-) – ujulu Jul 23 '16 at 16:22
  • Now I have No qualifying bean of type in Backing bean, but I'm sure that bean in SpringConfiguration class is started but the backing bean is not in same context – Michel Foucault Jul 23 '16 at 19:37
  • I solved the solution is [here](http://stackoverflow.com/questions/38551532/spring-autowiredrequired-true-is-null?noredirect=1#comment64493794_38551532) – Michel Foucault Jul 24 '16 at 16:24

0 Answers0