[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3836) NPE in parameter conversion after rule redirect: valueExpression.getType returns null!
Francisco Jose Peredo Noguez (JIRA)
jira-events at lists.jboss.org
Thu Dec 11 16:29:46 EST 2008
[ https://jira.jboss.org/jira/browse/JBSEAM-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12442235#action_12442235 ]
Francisco Jose Peredo Noguez commented on JBSEAM-3836:
------------------------------------------------------
I wonder... isn't Seam trying to be too smart for its own sake? Why does it try to guess the type of an EL expression like "#{categoriaBienCveCategoriaFor}? Why not just wait until it needs to evaluate it, and the ask for then ask for type of the resulting value?
> NPE in parameter conversion after rule redirect: valueExpression.getType returns null!
> --------------------------------------------------------------------------------------
>
> Key: JBSEAM-3836
> URL: https://jira.jboss.org/jira/browse/JBSEAM-3836
> Project: Seam
> Issue Type: Bug
> Affects Versions: 2.1.0.SP1
> Reporter: Francisco Jose Peredo Noguez
>
> I am getting this WARNING in my logs:
> WARN org.jboss.seam.navigation.Param - could not create converter for: categoriaBienCveCategoria
> java.lang.NullPointerException
> at org.jboss.seam.jsf.SeamApplication$ConverterLocator.locateConverter(SeamApplication.java:166) [jboss-seam.jar:2.1.0.SP1]
> (The full stacktrace is available in the referenced forum thread)
> This happens when I hit a navigation rule like this:
> <rule if-outcome="persisted" if="#{not empty categoriaBienCveCategoriaFor}">
> <end-conversation/>
> <redirect view-id="#{categoriaBienFrom}">
> <param name="categoriaBienCveCategoria" value="#{categoriaBienCveCategoriaFor}"/>
> <param name="categoriaBienFrom" value="/Crud/CategoriaBien/CategoriaBienList.xhtml"/>
> </redirect>
> </rule>
> As a side effect the categoriaBienCveCategoria is not set with the value in #{categoriaBienCveCategoriaFor}, and that makes my validation rule useless.
> But I found a weird workaround, if I change:
> <param name="categoriaBienCveCategoria" value="#{categoriaBienCveCategoriaFor}"/>
> to
> <param name="categoriaBienCveCategoria" value="#{categoriaBienCveCategoriaFor+0}"/>
> Everything works fine (and the WARN dissapears) I think this is a bug in the way Seam 2.1.0SP1 is dealing with conversions.
> In org.jboss.seam.navigation.Param.getConverter() the call valueExpression.getType() is returning null for #{categoriaBienCveCategoriaFor}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list