myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerald Turner <gtur...@unzane.com>
Subject Bug EXTVAL-130?
Date Tue, 04 Dec 2012 19:40:38 GMT
Hello, I'm in the process of converting a JSF2/CDI application from
Seam3 to MyFaces ExtCDI/CODI.  The application had been using MyFaces
ExtVal-BV so that JSR-303 cross-field validation would work in the
front-end.  Simply replacing Seam3 with CODI evoked the following
stacktrace during the first page view (during MyFaces EXT* lazy init),
and ExtVal-BV doesn't seem to be working entirely (annotations like
@DateIs work, but my ConstraintValidators aren't being executed).
Things actually get worse than that, some injection points no longer
work, particularly on an abstract superclass - but I figure I should
solve this warning before exploring that issue.  Also injection in
FacesConverter and ConstraintValidators (when triggered by JPA) don't
work even after annotating with @Advanced - again, probably a secondary
effect.  Also yet another tangent - I've heard that CODI and Seam3 can
be deployed together, but under JBoss 7.1.1.Final the app doesn't deploy
due to Weld errors with ambiguous producers - I haven't found any
documentation that describes any Veto-esque configuration.

This looks exactly like JIRA issue EXTVAL-130, only I'm using JBoss
7.1.1.Final instead of Glassfish, but they both share Weld, and I am
using ExtVal 2.0.6, which is the fixed version.

Relevant parts of my pom.xml:

    <!-- CDI & MyFaces ExtCDI/CODI -->
    <dependency>
      <groupId>javax.enterprise</groupId>
      <artifactId>cdi-api</artifactId>
      <version>1.0-SP4</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>
      <artifactId>myfaces-extcdi-bundle-jsf20</artifactId>
      <version>1.0.5</version>
    </dependency>

    <!-- MyFaces ExtVal -->
    <dependency>
      <groupId>org.apache.myfaces.extensions.validator.validation-modules</groupId>
      <artifactId>myfaces-extval-property-validation</artifactId>
      <version>2.0.6</version>
      <exclusions>
        <exclusion>
          <groupId>javax.persistence</groupId>
          <artifactId>persistence-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.myfaces.extensions.validator.validation-modules</groupId>
      <artifactId>myfaces-extval-bean-validation</artifactId>
      <version>2.0.6</version>
      <exclusions>
        <exclusion>
          <groupId>javax.validation</groupId>
          <artifactId>validation-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

Some bits of the CODI startup version output (need to see the booleans
too?):

  10:56:32,600 INFO [org.apache.myfaces.extensions.cdi.jsf2.impl.Jsf2ModuleStartupObserver]
(http--0.0.0.0-8080-1) [Started] MyFaces CODI JSF-Module v1.0.5 for JSF 2.0 Used JSF implementation:
Mojarra vnull

  10:56:32,611 INFO [org.apache.myfaces.extensions.cdi.jpa.impl.JpaModuleStartupObserver]
(http--0.0.0.0-8080-1) [Started] MyFaces CODI JPA-Module v1.0.5

  10:56:32,620 INFO [org.apache.myfaces.extensions.cdi.core.impl.CoreStartupObserver] (http--0.0.0.0-8080-1)
[Started] MyFaces CODI (Extensions CDI) Core v1.0.5 Used CDI implementation: Weld v2012-02-10
15:31

The stacktrace:

  10:56:33,838 WARNING [org.apache.myfaces.extensions.validator.beanval.ValidatorFactoryProxy]
(http--0.0.0.0-8080-1) failed to lookup a bean with the name contextAwareValidatorFactory:
java.lang.IllegalStateException: No CreationalContext registered for EL evaluation, it is
likely that the the expression factory has not been wrapped by the CDI BeanManager, which
must be done to use the ELResolver from CDI
    at org.jboss.weld.el.AbstractWeldELResolver.getELCreationalContext(AbstractWeldELResolver.java:148)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
    at org.jboss.weld.el.AbstractWeldELResolver.lookup(AbstractWeldELResolver.java:123) [weld-core-1.1.5.AS71.Final.jar:2012-02-10
15:31]
    at org.jboss.weld.el.AbstractWeldELResolver.getValue(AbstractWeldELResolver.java:96) [weld-core-1.1.5.AS71.Final.jar:2012-02-10
15:31]
    at org.jboss.as.weld.webtier.jsf.ForwardingELResolver.getValue(ForwardingELResolver.java:46)
[jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175) [jboss-el-api_2.2_spec-1.0.0.Final.jar:1.0.0.Final]
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
[jsf-impl-2.1.7-jbossorg-2.jar:]
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
[jsf-impl-2.1.7-jbossorg-2.jar:]
    at org.apache.myfaces.extensions.validator.core.el.DefaultELHelper.getBean(DefaultELHelper.java:79)
[myfaces-extval-core-2.0.6.jar:2.0.6]
    at org.apache.myfaces.extensions.validator.beanval.ValidatorFactoryProxy.getValidatorFactory(ValidatorFactoryProxy.java:58)
[myfaces-extval-bean-validation-2.0.6.jar:2.0.6]
    at org.apache.myfaces.extensions.validator.beanval.ValidatorFactoryProxy.getValidator(ValidatorFactoryProxy.java:86)
[myfaces-extval-bean-validation-2.0.6.jar:2.0.6]
    at org.apache.myfaces.extensions.validator.beanval.util.BeanValidationUtils.getElementDescriptor(BeanValidationUtils.java:108)
[myfaces-extval-bean-validation-2.0.6.jar:2.0.6]
    at org.apache.myfaces.extensions.validator.beanval.BeanValidationModuleValidationInterceptorInternals.initComponentWithPropertyDetails(BeanValidationModuleValidationInterceptorInternals.java:104)
[myfaces-extval-bean-validation-2.0.6.jar:2.0.6]
    at org.apache.myfaces.extensions.validator.beanval.BeanValidationModuleValidationInterceptor.initComponentWithPropertyDetails(BeanValidationModuleValidationInterceptor.java:70)
[myfaces-extval-bean-validation-2.0.6.jar:2.0.6]
    at org.apache.myfaces.extensions.validator.beanval.BeanValidationModuleValidationInterceptor.initComponent(BeanValidationModuleValidationInterceptor.java:60)
[myfaces-extval-bean-validation-2.0.6.jar:2.0.6]
    at org.apache.myfaces.extensions.validator.core.interceptor.AbstractValidationInterceptor.beforeEncodeBegin(AbstractValidationInterceptor.java:112)
[myfaces-extval-core-2.0.6.jar:2.0.6]
    at org.apache.myfaces.extensions.validator.core.renderkit.ExtValRendererWrapper.encodeBegin(ExtValRendererWrapper.java:183)
[myfaces-extval-core-2.0.6.jar:2.0.6]
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:302)
[jsf-impl-2.1.7-jbossorg-2.jar:]
    at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185) [jsf-impl-2.1.7-jbossorg-2.jar:]
    at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
[jsf-impl-2.1.7-jbossorg-2.jar:]
    at org.apache.myfaces.extensions.validator.core.renderkit.ExtValLazyRendererProxy.encodeChildren(ExtValLazyRendererProxy.java:70)
[myfaces-extval-core-2.0.6.jar:2.0.6]
    at org.apache.myfaces.extensions.validator.core.renderkit.ExtValRendererWrapper.encodeChildren(ExtValRendererWrapper.java:286)
[myfaces-extval-core-2.0.6.jar:2.0.6]
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
    at javax.faces.rinal.jar:]
    at org.jboss.as.jpa.interceptor.WebNonTxEmCl

-- 
Gerald Turner   Email: gturner@unzane.com   JID: gturner@unzane.com
GPG: 0xFA8CD6D5  21D9 B2E8 7FE7 F19E 5F7D  4D0C 3FA0 810F FA8C D6D5

Mime
View raw message