Probably
Object valueObject = getDataSqueezer().unsqueeze(submittedValue);
returns null

That hidden value that you mention (If_16_0), is it always with no value?
or just only when the exception is thrown?

BTW, you can give names to your If components so that's it's easier to track
which is which - something like <span jwcid="ifcit...@if" ...>

So, I was thinking perhaps getDocHasFundCites() encounters problems
while rendering
in those random cases, but you'd get excpetions if that was the case...


On Tue, Mar 10, 2009 at 10:51 PM, Tony Giaccone <[email protected]> wrote:
> it was mentioned to me that I hadn't mentioned in my earlier post that this
> was a Tapestry 4.1.5 problem.
>
> Also further diagnosis shows that there seems to be a problem with the @IF
> component.
>
> Here's the code the If is bound to:
>
>    public boolean getDocHasFundCites()
>    {
>        boolean retValue= false;
>        if (getDetailFD() != null)
>        {
>            retValue = (getDetailFD().getFundCites() != null) &&
>                        (getDetailFD().getFundCites().size() > 0);
>        }
>        return (retValue);
>    }
>
>
> In the page from the exception there's the HttpServletRequest  stanza,
>
> among the many IF statements that are called out, well here I'll just copy
> the significant lines.
>
> If_14_0 T
> If_15_0 T
> If_16_0
> If_18   F
> If_1_0  F
> If_20   F
> If_22   T
>
> Notice on the line that start If_16_0, there is no boolean value, no T or F.
>
>
> I'm guessing that is what's causing this exception:
>
> [ +/- ] Exception: Unable to convert back into a boolean in If component. <
> https://mipr-dev/mipr/MiprDetail,miprForm.sdirect#>
> org.apache.hivemind.ApplicationRuntimeException
> Stack Trace:
> org.apache.tapestry.components.IfBean.readValue(IfBean.java:184)
> org.apache.tapestry.components.IfBean.evaluateCondition(IfBean.java:143)
> org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:66)
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>
> This code works the vast majority of the time. These exceptions seem to be
> thrown "randomly". Of course I'm sure that it's not
> random, I just don't know what set of circumstances cause it to occur.
> Here's the code from the Tapestry Frameworks that's
> throwing the exception:
>
>            Object valueObject =
> getDataSqueezer().unsqueeze(submittedValue);
>            if (!(valueObject instanceof Boolean))
>                throw new
> ApplicationRuntimeException(Tapestry.format("If.invalid-condition-type",
> submittedValue));
>            return ((Boolean) valueObject).booleanValue();
>
> I haven't gone deep enough in the process to know if the unsqueeze is
> throwing the exception or if it's the exception
> thrown after the if instanceof.
>
>
> Any suggestions or ideas??
>
>
> Tony Giaccone
>



-- 
Andreas Andreou - [email protected] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to