You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jan-Kees van Andel (JIRA)" <de...@myfaces.apache.org> on 2011/02/21 11:06:38 UTC
[jira] Created: (MYFACES-3049) Bean Validation doesn't work with
Glassfish el-impl-2.2
Bean Validation doesn't work with Glassfish el-impl-2.2
-------------------------------------------------------
Key: MYFACES-3049
URL: https://issues.apache.org/jira/browse/MYFACES-3049
Project: MyFaces Core
Issue Type: Bug
Components: JSR-314
Affects Versions: 2.0.4
Environment: Tomcat 2.0.29
Reporter: Jan-Kees van Andel
I have this expression in my Facelet: #{newPaymentBean.payment.toAccount}
"payment" resolves to the following:
@Entity
public class Payment implements Serializable {
// More stuff...
@NotNull @AccountNumber private String toAccount;
// More stuff...
}
When debugging in javax.faces.validator._BeanValidatorUELUtils, I noticed the following on line 47 "ValueReference valueReference = valueExpression.getValueReference(elCtx);":
* With Glassfish EL, "valueReference.property" is null. This causes the BeanValidator to return at line 161, and to skip validation. "valueReference.base" points to the Payment object btw.
* With JUEL 2.2.3, "valueReference.property" is "toAccount", which is correct AFAIK.
I'm not sure whether this is a MyFaces or EL issue. I remember that when I wrote the BeanValidator, that the spec literally said what to do. See: http://javaserverfaces.java.net/nonav/docs/2.0/javadocs/javax/faces/validator/BeanValidator.html#validate(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
So I guess this is an EL implementation issue, but I filed it nevertheless, at least for archiving purposes...
WDYT?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-3049) Bean Validation doesn't work with
Glassfish el-impl-2.2
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997348#comment-12997348 ]
Jakob Korherr commented on MYFACES-3049:
----------------------------------------
Yes, but it should work anyway. This check would just come after the fallback.
> Bean Validation doesn't work with Glassfish el-impl-2.2
> -------------------------------------------------------
>
> Key: MYFACES-3049
> URL: https://issues.apache.org/jira/browse/MYFACES-3049
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.4
> Environment: Tomcat 2.0.29
> Reporter: Jan-Kees van Andel
>
> I have this expression in my Facelet: #{newPaymentBean.payment.toAccount}
> "payment" resolves to the following:
> @Entity
> public class Payment implements Serializable {
> // More stuff...
> @NotNull @AccountNumber private String toAccount;
> // More stuff...
> }
> When debugging in javax.faces.validator._BeanValidatorUELUtils, I noticed the following on line 47 "ValueReference valueReference = valueExpression.getValueReference(elCtx);":
> * With Glassfish EL, "valueReference.property" is null. This causes the BeanValidator to return at line 161, and to skip validation. "valueReference.base" points to the Payment object btw.
> * With JUEL 2.2.3, "valueReference.property" is "toAccount", which is correct AFAIK.
> I'm not sure whether this is a MyFaces or EL issue. I remember that when I wrote the BeanValidator, that the spec literally said what to do. See: http://javaserverfaces.java.net/nonav/docs/2.0/javadocs/javax/faces/validator/BeanValidator.html#validate(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
> So I guess this is an EL implementation issue, but I filed it nevertheless, at least for archiving purposes...
> WDYT?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-3049) Bean Validation doesn't work with
Glassfish el-impl-2.2
Posted by "Jan-Kees van Andel (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997347#comment-12997347 ]
Jan-Kees van Andel commented on MYFACES-3049:
---------------------------------------------
Not sure if we can do this. You added a null-check already to prevent BV to validate for example Collections. So adding this fallback will probably break this, right?
> Bean Validation doesn't work with Glassfish el-impl-2.2
> -------------------------------------------------------
>
> Key: MYFACES-3049
> URL: https://issues.apache.org/jira/browse/MYFACES-3049
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.4
> Environment: Tomcat 2.0.29
> Reporter: Jan-Kees van Andel
>
> I have this expression in my Facelet: #{newPaymentBean.payment.toAccount}
> "payment" resolves to the following:
> @Entity
> public class Payment implements Serializable {
> // More stuff...
> @NotNull @AccountNumber private String toAccount;
> // More stuff...
> }
> When debugging in javax.faces.validator._BeanValidatorUELUtils, I noticed the following on line 47 "ValueReference valueReference = valueExpression.getValueReference(elCtx);":
> * With Glassfish EL, "valueReference.property" is null. This causes the BeanValidator to return at line 161, and to skip validation. "valueReference.base" points to the Payment object btw.
> * With JUEL 2.2.3, "valueReference.property" is "toAccount", which is correct AFAIK.
> I'm not sure whether this is a MyFaces or EL issue. I remember that when I wrote the BeanValidator, that the spec literally said what to do. See: http://javaserverfaces.java.net/nonav/docs/2.0/javadocs/javax/faces/validator/BeanValidator.html#validate(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
> So I guess this is an EL implementation issue, but I filed it nevertheless, at least for archiving purposes...
> WDYT?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (MYFACES-3049) Bean Validation doesn't work with
Glassfish el-impl-2.2
Posted by "Jan-Kees van Andel (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan-Kees van Andel resolved MYFACES-3049.
-----------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.5-SNAPSHOT
Fixed. Added the check, fallback and warning as discussed with Jakob.
> Bean Validation doesn't work with Glassfish el-impl-2.2
> -------------------------------------------------------
>
> Key: MYFACES-3049
> URL: https://issues.apache.org/jira/browse/MYFACES-3049
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.4
> Environment: Tomcat 2.0.29
> Reporter: Jan-Kees van Andel
> Assignee: Jan-Kees van Andel
> Fix For: 2.0.5-SNAPSHOT
>
>
> I have this expression in my Facelet: #{newPaymentBean.payment.toAccount}
> "payment" resolves to the following:
> @Entity
> public class Payment implements Serializable {
> // More stuff...
> @NotNull @AccountNumber private String toAccount;
> // More stuff...
> }
> When debugging in javax.faces.validator._BeanValidatorUELUtils, I noticed the following on line 47 "ValueReference valueReference = valueExpression.getValueReference(elCtx);":
> * With Glassfish EL, "valueReference.property" is null. This causes the BeanValidator to return at line 161, and to skip validation. "valueReference.base" points to the Payment object btw.
> * With JUEL 2.2.3, "valueReference.property" is "toAccount", which is correct AFAIK.
> I'm not sure whether this is a MyFaces or EL issue. I remember that when I wrote the BeanValidator, that the spec literally said what to do. See: http://javaserverfaces.java.net/nonav/docs/2.0/javadocs/javax/faces/validator/BeanValidator.html#validate(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
> So I guess this is an EL implementation issue, but I filed it nevertheless, at least for archiving purposes...
> WDYT?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-3049) Bean Validation doesn't work with
Glassfish el-impl-2.2
Posted by "Jan-Kees van Andel (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997359#comment-12997359 ]
Jan-Kees van Andel commented on MYFACES-3049:
---------------------------------------------
Yep, you're right. And I guess we should log a warning (maybe once, to prevent trashing the log) to show the user that something is wrong with the configuration (b/c it also hurts performance).
> Bean Validation doesn't work with Glassfish el-impl-2.2
> -------------------------------------------------------
>
> Key: MYFACES-3049
> URL: https://issues.apache.org/jira/browse/MYFACES-3049
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.4
> Environment: Tomcat 2.0.29
> Reporter: Jan-Kees van Andel
>
> I have this expression in my Facelet: #{newPaymentBean.payment.toAccount}
> "payment" resolves to the following:
> @Entity
> public class Payment implements Serializable {
> // More stuff...
> @NotNull @AccountNumber private String toAccount;
> // More stuff...
> }
> When debugging in javax.faces.validator._BeanValidatorUELUtils, I noticed the following on line 47 "ValueReference valueReference = valueExpression.getValueReference(elCtx);":
> * With Glassfish EL, "valueReference.property" is null. This causes the BeanValidator to return at line 161, and to skip validation. "valueReference.base" points to the Payment object btw.
> * With JUEL 2.2.3, "valueReference.property" is "toAccount", which is correct AFAIK.
> I'm not sure whether this is a MyFaces or EL issue. I remember that when I wrote the BeanValidator, that the spec literally said what to do. See: http://javaserverfaces.java.net/nonav/docs/2.0/javadocs/javax/faces/validator/BeanValidator.html#validate(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
> So I guess this is an EL implementation issue, but I filed it nevertheless, at least for archiving purposes...
> WDYT?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-3049) Bean Validation doesn't work with
Glassfish el-impl-2.2
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997360#comment-12997360 ]
Jakob Korherr commented on MYFACES-3049:
----------------------------------------
+1 !
> Bean Validation doesn't work with Glassfish el-impl-2.2
> -------------------------------------------------------
>
> Key: MYFACES-3049
> URL: https://issues.apache.org/jira/browse/MYFACES-3049
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.4
> Environment: Tomcat 2.0.29
> Reporter: Jan-Kees van Andel
>
> I have this expression in my Facelet: #{newPaymentBean.payment.toAccount}
> "payment" resolves to the following:
> @Entity
> public class Payment implements Serializable {
> // More stuff...
> @NotNull @AccountNumber private String toAccount;
> // More stuff...
> }
> When debugging in javax.faces.validator._BeanValidatorUELUtils, I noticed the following on line 47 "ValueReference valueReference = valueExpression.getValueReference(elCtx);":
> * With Glassfish EL, "valueReference.property" is null. This causes the BeanValidator to return at line 161, and to skip validation. "valueReference.base" points to the Payment object btw.
> * With JUEL 2.2.3, "valueReference.property" is "toAccount", which is correct AFAIK.
> I'm not sure whether this is a MyFaces or EL issue. I remember that when I wrote the BeanValidator, that the spec literally said what to do. See: http://javaserverfaces.java.net/nonav/docs/2.0/javadocs/javax/faces/validator/BeanValidator.html#validate(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
> So I guess this is an EL implementation issue, but I filed it nevertheless, at least for archiving purposes...
> WDYT?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-3049) Bean Validation doesn't work with
Glassfish el-impl-2.2
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997334#comment-12997334 ]
Jakob Korherr commented on MYFACES-3049:
----------------------------------------
I totally agree that this is an EL impl bug!
However, we can maybe implement a fallback to the "legacy" el-1.0 mechanism (via dummy el-resolver) if el-2.2 returns null..
> Bean Validation doesn't work with Glassfish el-impl-2.2
> -------------------------------------------------------
>
> Key: MYFACES-3049
> URL: https://issues.apache.org/jira/browse/MYFACES-3049
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.4
> Environment: Tomcat 2.0.29
> Reporter: Jan-Kees van Andel
>
> I have this expression in my Facelet: #{newPaymentBean.payment.toAccount}
> "payment" resolves to the following:
> @Entity
> public class Payment implements Serializable {
> // More stuff...
> @NotNull @AccountNumber private String toAccount;
> // More stuff...
> }
> When debugging in javax.faces.validator._BeanValidatorUELUtils, I noticed the following on line 47 "ValueReference valueReference = valueExpression.getValueReference(elCtx);":
> * With Glassfish EL, "valueReference.property" is null. This causes the BeanValidator to return at line 161, and to skip validation. "valueReference.base" points to the Payment object btw.
> * With JUEL 2.2.3, "valueReference.property" is "toAccount", which is correct AFAIK.
> I'm not sure whether this is a MyFaces or EL issue. I remember that when I wrote the BeanValidator, that the spec literally said what to do. See: http://javaserverfaces.java.net/nonav/docs/2.0/javadocs/javax/faces/validator/BeanValidator.html#validate(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
> So I guess this is an EL implementation issue, but I filed it nevertheless, at least for archiving purposes...
> WDYT?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira