Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-17211

Unable to obtain CDI 1.1 utilities for Mojarra

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • 26.1.2.Final
    • JSF
    • None
    • Migration
    • ---
    • ---

    Description

      Related to the WFLY-1946, WFLY-10645

      An application (EAR) running  well under WildFly 10.1, does not run anymore to WildFly 26.1.2. POM where adjusted to use spec. from 26.x

      Logs display  this error :

      16:39:23,123 SEVERE [javax.enterprise.resource.webcontainer.jsf.flow] (MSC service thread 1-3) Unable to obtain CDI 1.1 utilities for Mojarra
      16:39:23,125 SEVERE [javax.enterprise.resource.webcontainer.jsf.application.view] (MSC service thread 1-3) Unable to obtain CDI 1.1 utilities for Mojarra
      

      So based on previous tickets, I decided to add the following fragment to the pom of the EAR file.

      <dependency>
          <groupId>org.glassfish</groupId>
          <artifactId>javax.faces</artifactId>
          <version>2.4.0</version>
      </dependency>

      and I got another error :

      Caused by: java.util.ServiceConfigurationError: com.sun.faces.util.cdi11.CDIUtil: Provider com.sun.faces.util.cdi11.CDIUtilImpl not a subtype
      	at java.util.ServiceLoader.fail(ServiceLoader.java:239)
      	at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
      	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
      	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
      	at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
      	at com.sun.faces.application.view.ViewScopeExtension.afterBeanDiscovery(ViewScopeExtension.java:99)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
      	... 25 more
      

      Module is javax.faces.api -> jboss-jsf-api_2.3_spec-3.1.0.SP01.jar

      <module name="javax.faces.api" xmlns="urn:jboss:module:1.9">
      
          <resources>
              <resource-root path="jboss-jsf-api_2.3_spec-3.1.0.SP01.jar"/>
          </resources>
      
          <dependencies>
              <module name="java.desktop"/>
              <module name="java.logging"/>
              <module name="java.sql"/>
              <module name="java.xml"/>
              <module name="com.sun.jsf-impl"/>
              <module name="javax.enterprise.api" export="true"/>
              <module name="javax.servlet.api" export="true"/>
              <module name="javax.servlet.jsp.api" export="true"/>
              <module name="javax.servlet.jstl.api" export="true"/>
              <module name="javax.validation.api" export="true"/>
              <module name="org.glassfish.jakarta.el" export="true"/>
              <!--WFLY-14219 Remove deprecated <module name="javax.api"/> -->
              <module name="javax.websocket.api"/>
          </dependencies>
      </module>
      

      I got the same error if I use :

                  <dependency>
                      <groupId>com.sun.faces</groupId>
                      <artifactId>jsf-impl</artifactId>
                      <version>2.2.20</version>
                  </dependency>
      

      So we do not know which implementation version is suitable to try to fix the issue, nor if it is a good way to do it.

      Please give us a workaround...

      Thank you

      Note : Deploying the WAR file instead of the EAR does not trigger the error (but may be later...) but another error described in WFLY-17212 stops us.

      Attachments

        Activity

          People

            jaslee@redhat.com Jason Lee
            jorelia jorelia ANDRE (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: