You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org> on 2011/01/05 11:17:46 UTC
[jira] Created: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
-----------------------------------------------------------------
Key: MYFACES-3010
URL: https://issues.apache.org/jira/browse/MYFACES-3010
Project: MyFaces Core
Issue Type: Bug
Components: General
Affects Versions: 2.0.3
Reporter: Kennard Consulting
Priority: Critical
Hi guys,
Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
1. Unzip the attached app and deploy as an exploded WAR into Tomcat
2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
3. In the Type dropdown, choose 'Business' and click Search
You will see an IllegalArgumentException. Now:
4. Stop Tomcat
5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
6. Restart Tomcat and repeat steps 1-3
This time you will see no such error.
So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the app can be viewed here:
http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
Regards,
Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980512#action_12980512 ]
Kennard Consulting commented on MYFACES-3010:
---------------------------------------------
Yep. I can confirm myfaces-api-2.0.4-20110111.213242-15.jar passes all my Metawidget tests. Please consider this issue closed. Thank you so much for your quick turnaround!
BTW: you may want to change the link on http://myfaces.apache.org/download.html to 'nightly build', it currently goes to http://people.apache.org/builds/myfaces/nightly/, which is why I couldn't find the nightly.
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Assignee: Leonardo Uribe
> Priority: Critical
> Fix For: 2.0.4-SNAPSHOT
>
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Imre Osswald (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979948#action_12979948 ]
Imre Osswald edited comment on MYFACES-3010 at 1/11/11 12:16 AM:
-----------------------------------------------------------------
Hi Leonardo,
i'd like to suggest to add another Version of this method to _ClassUtils "convertToTypeNoLogging" or convertToType(Object value, Class<?> desiredClass, boolean doLog) so that:
1) No String concatenation has to take place
2) The log is not "spammed" with SEVERE messages
Also I am not sure if you - in this usecase - want to catch any Exception or only the ones thrown in response to an "IllegalArgument" (not sure if ELExceptions might be thrown in similar cases)
(BTW/OT: I would say that EL coercion is configurable already. Either by registering it's own ExpressionFactory or as far as I know by registering PropertyEditors)
Regards,
Imre
was (Author: ioss):
Hi Leonardo,
i'd like to suggest to add another Version of this method to _ClassUtils "convertToTypeNoLogging" or convertToType(Object value, Class<?> desiredClass, boolean doLog) so that:
1) No String concatenation has to take place
2) The log is not "spammed" with SEVERE messages
Also I am not sure if you - this usecase - want to catch any Exception or only the ones thrown in response to an "IllegalArgument" (not sure if ELExceptions might be thrown in similar cases)
(BTW/OT: I would say that EL coercion is configurable already. Either by registering it's own ExpressionFactory or as far as I know by registering PropertyEditors)
Regards,
Imre
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Priority: Critical
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980301#action_12980301 ]
Leonardo Uribe commented on MYFACES-3010:
-----------------------------------------
Hi Richard
Yes, I know. The committed code takes into account both syntax, so the latest code in trunk should work like with 2.0.2
Leonardo
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Assignee: Leonardo Uribe
> Priority: Critical
> Fix For: 2.0.4-SNAPSHOT
>
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980455#action_12980455 ]
Kennard Consulting edited comment on MYFACES-3010 at 1/11/11 7:33 PM:
----------------------------------------------------------------------
Terrific. Could I trouble you to send a JAR to richard at kennardconsulting dot com (the nightly builds don't seem to be working anymore?) and I'll try it in Metawidget proper, which does a number of further tests?
was (Author: kennardconsulting):
Terrific. Could I trouble you to send a JAR to richard at kennardconsulting dot com and I'll try it in Metawidget proper (which does a number of further tests)?
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Assignee: Leonardo Uribe
> Priority: Critical
> Fix For: 2.0.4-SNAPSHOT
>
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979858#action_12979858 ]
Kennard Consulting commented on MYFACES-3010:
---------------------------------------------
Thanks for discovering that, Leonardo!
Where do we go from here?
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Priority: Critical
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980295#action_12980295 ]
Kennard Consulting edited comment on MYFACES-3010 at 1/11/11 2:51 PM:
----------------------------------------------------------------------
Leronardo,
Thanks for all your time on this.
I am a little concerned because the alternate syntax you propose is *not* functionally equivalent to the original syntax. Overriding the toString of an enum is legitimate, as is adding new methods to the enum if the developer chooses. I agree this has the effect of creating an anonymous inner class that is not .isEnum(), but previous versions of MyFaces have always supported this?
For example, the test webapp works fine with 2.0.2-api.jar? And MyFaces 1.x and Mojarra have always worked fine too.
Richard.
was (Author: kennardconsulting):
Leronardo,
Thanks for all your time on this.
I am a little concerned because the alternate syntax you propose is not functionally equivalent to the original syntax. Overriding the toString of an enum is legitimate, as is adding new methods to the enum if the developer chooses. I agree this has the effect of creating an anonymous inner class that is not .isEnum(), but previous versions of MyFaces have always supported this use case?
For example, the test webapp works fine with 2.0.2-api.jar?
Richard.
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Assignee: Leonardo Uribe
> Priority: Critical
> Fix For: 2.0.4-SNAPSHOT
>
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979875#action_12979875 ]
Kennard Consulting commented on MYFACES-3010:
---------------------------------------------
Okay terrific. I look forward to hearing what you work out, and am very willing to test any changes you want to try.
Regards,
Richard.
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Priority: Critical
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980455#action_12980455 ]
Kennard Consulting edited comment on MYFACES-3010 at 1/11/11 7:09 PM:
----------------------------------------------------------------------
Terrific. Could I trouble you to send a JAR to richard at kennardconsulting dot com and I'll try it in Metawidget proper (which does a number of further tests)?
was (Author: kennardconsulting):
Terrific. Could I trouble you to send a JAR to richard@kennardconsulting.com and I'll try it in Metawidget proper (which does a number of further tests)?
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Assignee: Leonardo Uribe
> Priority: Critical
> Fix For: 2.0.4-SNAPSHOT
>
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980295#action_12980295 ]
Kennard Consulting edited comment on MYFACES-3010 at 1/11/11 2:59 PM:
----------------------------------------------------------------------
Leronardo,
Thanks for all your time on this.
I am a little concerned because the alternate syntax you propose...
public enum ContactType {
PERSONAL, BUSINESS
}
...is *not* functionally equivalent to the original syntax. Overriding the toString of an enum is legitimate, as is adding new methods to the enum if the developer chooses. I agree this has the effect of creating an anonymous inner class that is not .isEnum(), but previous versions of MyFaces have always supported this?
For example, the test webapp works fine with 2.0.2-api.jar? And MyFaces 1.x and Mojarra have always worked fine too.
Richard.
was (Author: kennardconsulting):
Leronardo,
Thanks for all your time on this.
I am a little concerned because the alternate syntax you propose is *not* functionally equivalent to the original syntax. Overriding the toString of an enum is legitimate, as is adding new methods to the enum if the developer chooses. I agree this has the effect of creating an anonymous inner class that is not .isEnum(), but previous versions of MyFaces have always supported this?
For example, the test webapp works fine with 2.0.2-api.jar? And MyFaces 1.x and Mojarra have always worked fine too.
Richard.
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Assignee: Leonardo Uribe
> Priority: Critical
> Fix For: 2.0.4-SNAPSHOT
>
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980478#action_12980478 ]
Leonardo Uribe edited comment on MYFACES-3010 at 1/11/11 8:03 PM:
------------------------------------------------------------------
Looking on hudson:
https://hudson.apache.org/hudson/view/M-R/view/MyFaces/
Everything looks good. You can find the latest build here:
https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/core/
was (Author: lu4242):
Looking on hudson:
https://hudson.apache.org/hudson/view/M-R/view/MyFaces/
Everything looks good. You can find the latest build here:
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Assignee: Leonardo Uribe
> Priority: Critical
> Fix For: 2.0.4-SNAPSHOT
>
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Imre Osswald (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979948#action_12979948 ]
Imre Osswald edited comment on MYFACES-3010 at 1/11/11 12:17 AM:
-----------------------------------------------------------------
Hi Leonardo,
i'd like to suggest to add another Version of this method to _ClassUtils "convertToTypeNoLogging" or convertToType(Object value, Class<?> desiredClass, boolean doLog) so that:
1) No String concatenation has to take place
2) The log is not "spammed" with SEVERE messages
Also I am not sure if you - in this usecase - want to catch every Exceptions or only the ones thrown in response to an "IllegalArgument" (not sure if ELExceptions might be thrown in similar cases)
(BTW/OT: I would say that EL coercion is configurable already. Either by registering it's own ExpressionFactory or as far as I know by registering PropertyEditors)
Regards,
Imre
was (Author: ioss):
Hi Leonardo,
i'd like to suggest to add another Version of this method to _ClassUtils "convertToTypeNoLogging" or convertToType(Object value, Class<?> desiredClass, boolean doLog) so that:
1) No String concatenation has to take place
2) The log is not "spammed" with SEVERE messages
Also I am not sure if you - in this usecase - want to catch any Exception or only the ones thrown in response to an "IllegalArgument" (not sure if ELExceptions might be thrown in similar cases)
(BTW/OT: I would say that EL coercion is configurable already. Either by registering it's own ExpressionFactory or as far as I know by registering PropertyEditors)
Regards,
Imre
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Priority: Critical
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980478#action_12980478 ]
Leonardo Uribe commented on MYFACES-3010:
-----------------------------------------
Looking on hudson:
https://hudson.apache.org/hudson/view/M-R/view/MyFaces/
Everything looks good. You can find the latest build here:
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Assignee: Leonardo Uribe
> Priority: Critical
> Fix For: 2.0.4-SNAPSHOT
>
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980264#action_12980264 ]
Leonardo Uribe commented on MYFACES-3010:
-----------------------------------------
I checked the source code of the example and after some tests here is the problem:
public enum ContactType {
PERSONAL {
@Override
public String toString() {
return "Personal";
}
},
BUSINESS {
@Override
public String toString() {
return "Business";
}
}
}
that syntax is correct, but it has a side effect. In this case the base class of PERSONAL and BUSINESS is not ContactType, is ContactType$1 or ContactType$2.
If the enumeration is written like this:
public enum ContactType {
PERSONAL, BUSINESS
}
the base class for PERSONAL and BUSINESS is ContactType, and when it is called class.isEnum(), it returns true, but with ContactType$1 that is not true, because the class marked as enumeration is ContactType.
I tried a variant of the example with Mojarra 2.0.3 and it does not show the error message (supporting the argumentation about swallow the exception), but it says later that the value is not valid, because it cannot coerce the string and the comparison fails (the value does not belongs to the valid list values).
I'll commit a solution on MYFACES-2920 soon
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Priority: Critical
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979820#action_12979820 ]
Kennard Consulting commented on MYFACES-3010:
---------------------------------------------
The IllegalArgumentException is below. Note it appears to be specific to my app, but does not occur with previous versions of MyFaces (2.0.2, JSF 1.2 and JSF 1.1) or with Mojarra:
javax.faces.FacesException: java.lang.IllegalArgumentException: Cannot convert Personal of type class org.metawidget.example.shared.addressbook.model.ContactType$1 to class org.metawidget.example.shared.addressbook.model.ContactType$2
at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241)
at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:191)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: Cannot convert Personal of type class org.metawidget.example.shared.addressbook.model.ContactType$1 to class org.metawidget.example.shared.addressbook.model.ContactType$2
at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:375)
at org.apache.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:46)
at javax.faces.component._ClassUtils.convertToType(_ClassUtils.java:337)
at javax.faces.component._SelectItemsUtil._convertOrCoerceValue(_SelectItemsUtil.java:133)
at javax.faces.component._SelectItemsUtil.matchValue(_SelectItemsUtil.java:65)
at javax.faces.component.UISelectOne.validateValue(UISelectOne.java:77)
at javax.faces.component.UIInput.validate(UIInput.java:583)
at javax.faces.component.UIInput.processValidators(UIInput.java:247)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1218)
at javax.faces.component.UIForm.processValidators(UIForm.java:147)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1218)
at javax.faces.component.UIViewRoot._processValidatorsDefault(UIViewRoot.java:1322)
at javax.faces.component.UIViewRoot.access$500(UIViewRoot.java:75)
at javax.faces.component.UIViewRoot$ProcessValidatorPhaseProcessor.process(UIViewRoot.java:1397)
at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1278)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:754)
at org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:34)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:171)
... 14 more
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Priority: Critical
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980295#action_12980295 ]
Kennard Consulting commented on MYFACES-3010:
---------------------------------------------
Leronardo,
Thanks for all your time on this.
I am a little concerned because the alternate syntax you propose is not functionally equivalent to the original syntax. Overriding the toString of an enum is legitimate, as is adding new methods to the enum if the developer chooses. I agree this has the effect of creating an anonymous inner class that is not .isEnum(), but previous versions of MyFaces have always supported this use case?
For example, the test webapp works fine with 2.0.2-api.jar?
Richard.
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Assignee: Leonardo Uribe
> Priority: Critical
> Fix For: 2.0.4-SNAPSHOT
>
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979873#action_12979873 ]
Leonardo Uribe commented on MYFACES-3010:
-----------------------------------------
The problem is on the patch applied on MYFACES-2920, we did not take into account other cases when a custom class is used and the values are inherited from a base class.
The "context" where this coercion happens, is to compare a itemValue with the current value, just to check if the selection submitted is valid. The IllegalArgumentException just say that we can't coerce the itemValue to the value class, but that does not means the match should fail. Instead, if the IllegalArgumentException or any other Exception is thrown, we just fallback to use the value without any coercion (in this case selectItem.getValue() ) and "swallow" the Exception, because after all, it is no relevant. Note if the submitted value can't be matched with a itemValue of the component, an Exception will be thrown later.
The other consideration supporting the "swallow any exception" solution is the posibility that EL coercion could be configured in later versions of unified EL.
I think in this case we should wrap the call to _ClassUtils.convertToType in a try / catch block, but I would like to add some junit cases first.
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Priority: Critical
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe resolved MYFACES-3010.
-------------------------------------
Resolution: Fixed
Assignee: Leonardo Uribe
Thanks to Imre Osswald for your consideration with convertToType method.
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Assignee: Leonardo Uribe
> Priority: Critical
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Imre Osswald (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979948#action_12979948 ]
Imre Osswald commented on MYFACES-3010:
---------------------------------------
Hi Leonardo,
i'd like to suggest to add another Version of this method to _ClassUtils "convertToTypeNoLogging" or convertToType(Object value, Class<?> desiredClass, boolean doLog) so that:
1) No String concatenation has to take place
2) The log is not "spammed" with SEVERE messages
Also I am not sure if you - this usecase - want to catch any Exception or only the ones thrown in response to an "IllegalArgument" (not sure if ELExceptions might be thrown in similar cases)
(BTW/OT: I would say that EL coercion is configurable already. Either by registering it's own ExpressionFactory or as far as I know by registering PropertyEditors)
Regards,
Imre
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Priority: Critical
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3010) 2.0.3 REGRESSION:
javax.faces.component._ClassUtils.convertToType
Posted by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980455#action_12980455 ]
Kennard Consulting commented on MYFACES-3010:
---------------------------------------------
Terrific. Could I trouble you to send a JAR to richard@kennardconsulting.com and I'll try it in Metawidget proper (which does a number of further tests)?
> 2.0.3 REGRESSION: javax.faces.component._ClassUtils.convertToType
> -----------------------------------------------------------------
>
> Key: MYFACES-3010
> URL: https://issues.apache.org/jira/browse/MYFACES-3010
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.3
> Reporter: Kennard Consulting
> Assignee: Leonardo Uribe
> Priority: Critical
> Fix For: 2.0.4-SNAPSHOT
>
> Attachments: addressbook-faces2.zip
>
>
> Hi guys,
> Thanks again for the great work you do on MyFaces and your fantastic JIRA response times!
> I attach a small app that comes from the Metawidget (http://metawidget.org) distribution. I had you do MYFACES-2935 for me for MyFaces 2.0.3, and my app was working great with the 2.0.3-impl-SNAPSHOT.jar and the 2.0.2-api.jar. However now that 2.0.3 is out for real I have tried to upgrade my app, and it fails. To reproduce, please:
> 1. Unzip the attached app and deploy as an exploded WAR into Tomcat
> 2. Run Tomcat and hit http://localhost:8080/addressbook-faces2
> 3. In the Type dropdown, choose 'Business' and click Search
> You will see an IllegalArgumentException. Now:
> 4. Stop Tomcat
> 5. Inside the exploded WAR, rename myfaces-api-2.0.2.rename.me to myfaces-api-2.0.2.jar (and delete/rename myfaces-api-2.0.3.jar)
> 6. Restart Tomcat and repeat steps 1-3
> This time you will see no such error.
> So something appears to have broken between myfaces-api-2.0.2.jar and myfaces-api-2.0.3.jar? Hopefully you can reproduce this and it is enough for you to debug the issue. The source code for the small app can be viewed here:
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/faces/addressbook/
> http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/shared/addressbook/
> Of course, this could well be a case of 2.0.3 being stricter about something and therefore exposing a bug in my code. But my code worked in 2.0.2, JSF 1.2 and JSF 1.1, so hopefully not!
> Regards,
> Richard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.