[ 
https://issues.apache.org/jira/browse/PLUTO-794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Neil Griffin updated PLUTO-794:
-------------------------------
    Attachment: stacktrace.txt

> Downgrade to hibernate-validator-5.4.3.Final and validation-api-1.1.0.Final 
> in order to conform to Java EE 7
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-794
>                 URL: https://issues.apache.org/jira/browse/PLUTO-794
>             Project: Pluto
>          Issue Type: Task
>          Components: build system, demo portlets, maven archetypes
>            Reporter: Neil Griffin
>            Assignee: Neil Griffin
>            Priority: Major
>             Fix For: 3.1.1
>
>         Attachments: stacktrace.txt
>
>
> Section 1.8 of the Portlet 3.0 Specification titled "Relationship to Java 
> Enterprise Edition" states:
> {quote}
> The Portlet API v3.0 is based on the Java Standard Edition 7.0 and Java 
> Enterprise Edition v7.0. Portlet containers should at least meet the 
> requirements described by the Java EE 7.0 specification for executing in a 
> Java EE environment.
> {quote}
> Pluto 3.x implements the Portlet 3.0 API and [targets Java EE 7, which 
> includes the CDI 1.2 API and the Bean Validation 1.1 
> API|https://en.wikipedia.org/wiki/Jakarta_EE#Web_profile]. . As such, it 
> relies on JBoss Weld 2.3.1.Final (which implements the CDI 1.2 API).
> When trying to upgrade to hibernate-validator-6.0.20.Final via PLUTO-791, the 
> attached stacktrace started happening when trying to onblur out of the 
> "Postal Code" field of the applicant-mvcbean-cdi-jsp-portlet demo. This 
> revealed that hibernate-validator-6.0.20.Final was attempting to call the 
> [javax.enterprise.inject.spi.BeanManager.createInstance()|https://javaee.github.io/javaee-spec/javadocs/javax/enterprise/inject/spi/BeanManager.html#createInstance--]
>  method, which the Javadoc indicates was introduced in CDI 2.0.
> Upon closer examination, the Hibernate Validator Releases page states that 
> version 6.0 targets Bean Validation 2.0, which explains why the Hibernate 
> Validator implementation of the Bean Validation API would be permitted to 
> call version 2.0 method signatures in the Bean Validation API.
> The [Hibernate Validator FAQ 
> page|https://hibernate.org/validator/faq/#whats-the-difference-between-hibernate-validator-3-4-and-5]
>  states that Hibernate Validator 5.x is the reference implementation of Bean 
> Validation 1.1 (JSR 349). In addition, the project's main 
> [pom.xml|https://github.com/hibernate/hibernate-validator/blob/5.4/pom.xml#L133]
>  descriptor corroborates the FAQ. Therefore, in order to be compatible with 
> CDI 1.2 and Bean Validation 1.1 (Java EE 7), it is necessary to downgrade to 
> the newest version of Hibernate Validator 5.x (which is 
> hibernate-validator-5.4.3.Final at the time of this writing) and 
> validation-api-1.1.0.Final



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to