9 Replies Latest reply on Nov 8, 2013 7:34 AM by Meissa Sakho

    problem with CODI and Weld

    Meissa Sakho Newbie

      Hi all,

      I'm trying to use CODI ConversationScoped with Weld.

      I'm facing with problem that while running my application on linux.

      I have to mention that everything is working fine in windows.

      I'm using jboss AS 7.1.1 final with the defautl WELD that is blundled with it.

      Below is the extract of the extract:

       

      11:02:34,098 INFO [org.apache.myfaces.extensions.cdi.scripting.impl.ScriptingModuleStartupObserver] (ajp--127.0.0.1-8509-3) [Started] MyFaces CODI Scripting-Module v1.0.3

       

      11:02:34,101 INFO [org.apache.myfaces.extensions.cdi.bv.impl.BeanValidationModuleStartupObserver] (ajp--127.0.0.1-8509-3) [Started] MyFaces CODI Bean-Validation-Module v1.0.3

      11:02:34,137 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/proto-icm-simu-web].[FacesServlet]] (ajp--127.0.0.1-8509-3) "Servlet.service()"

      pour la servlet FacesServlet a généré une exception: org.jboss.weld.exceptions.AmbiguousResolutionException:

      WELD-001318 Cannot resolve an ambiguous dependency between

      [Managed Bean [class org.apache.myfaces.extensions.cdi.jsf2.impl.request.DefaultRequestTypeResolver]

      with qualifiers [@Any @Default], Managed Bean [class org.apache.myfaces.extensions.cdi.jsf.impl.request.DefaultRequestTypeResolver]

      with qualifiers [@Any @Default]]

      at org.jboss.weld.manager.BeanManagerImpl.resolve(BeanManagerImpl.java:1013) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

        at

      My web.xml file is also below:

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

      <web-app id="WebApp_ID" version="3.0"

        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-app_3_0.xsd">

       

        <display-name>Simulation Conso</display-name>

        <context-param>

        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>

        <param-value>.xhtml</param-value>

        </context-param>

        <context-param>

          <param-name>com.sun.faces.autoCompleteOffOnViewState</param-name>

          <param-value>false</param-value>

        </context-param>

        <!-- empty parameters are considered null -->

        <context-param>

        <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>

        <param-value>true</param-value>

        </context-param>

        <!-- allow to use xml comments in xhtml -->

        <context-param>

        <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>

        <param-value>true</param-value>

        </context-param>

        <welcome-file-list>

        <welcome-file>/index.html</welcome-file>

        </welcome-file-list>

        

        <servlet>

        <servlet-name>FacesServlet</servlet-name>

        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

        <load-on-startup>1</load-on-startup>

        </servlet>

        <servlet-mapping>

        <servlet-name>FacesServlet</servlet-name>

        <url-pattern>*.xhtml</url-pattern>

        </servlet-mapping>

       

       

      </web-app>

       

      Any help would be greeelty appreciated.

      Massai.