[
https://jira.jboss.org/jira/browse/JBSEAM-2562?page=com.atlassian.jira.pl...
]
Greg Wittel commented on JBSEAM-2562:
-------------------------------------
The problem causing code looks to be in org.jboss.seam.framework.Query
In particular, the parseEjbql() function looks for either parsedEjbql or
parsedRestrictions to be null. Only then will it update the restriction data. The problem
then arises when getRenderedEjbql() is called where it iterates through the CURRENT
restrictions (via getRestrictions()) which now differ from the cached restriction data
generated in parseEjbql(). If you add a restriction, then it you run into a boundary
issue when it tries to retrieve the parameter:
Object parameterValue = restrictionParameters.get(i).getValue();
The function 'setRestrictions()' will reset parsedRestrictions to null. So
another workaround is to to call setRestrictions() when your restriction list changes:
if(....) {
restrictions.add("....");
setRestrictions(restrictions)
}
The same problem would impact the cached 'parsedEjbql' if you were to change the
string returned by getEjbql().
'Transaction failed' JSF message when number of restrictions
in EntityQuery changes
-----------------------------------------------------------------------------------
Key: JBSEAM-2562
URL:
https://jira.jboss.org/jira/browse/JBSEAM-2562
Project: Seam
Issue Type: Bug
Components: Framework
Affects Versions: 2.0.1.GA
Environment: JBoss AS 4.2.2, Windows XP
Reporter: Siarhei Dudzin
Fix For: The future
When getRestrictions() from EntityQuerry returns dynamic list with restrictions a JSF
error message 'Transaction failed' is shown (no exceptions just a message). I
noticed this happens when the size of the list is decreased in comparison with the
previous request (There is also a warning in the logs).
While this JSF message is shown the query still works!
After some debugging I've found that the underlying error is that a value binding
could not be found. A temprorarily workaround is to keep the restriction list constant by
filling the 'gaps' with placeholders like #{true}=true (just to keep the size
constant).
--
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