Max,

I'm not sure if I modify anything within the table...
The form we have here is kinda complicated and hard to rectify keeping
the defect appearing.
The exception is thrown when a few manual operations on the form are done,
it's not just open web page and that's it.

I agree with you that finding the root of a problem is required.

But what you can easily observe is the simple coding error : an object which
is not an array is being casted to an array type. This causes an exception.
My patch fixes coding mistake only.

Nevertheless, I will allocate some more of time onto rectification of the
issue.

Regards,
Dmitry



On 21 June 2010 18:08, Max Starets <[email protected]> wrote:

> Dmitry,
>
> We need to figure out what is going on first.
> Are you modifying components within table dynamically?
>
> Since the same components are being stamped for each row, it is expected
> that the component
> set does not change when each row is decoded or rendered.
>
> Regards,
> Max Starets
>
>
> Dmitry Barsukov wrote:
>
>> Hi All,
>>
>>
>> org.apache.myfaces.trinidad.component.StampState.restoreChildStampState(StampState.java:201)
>>
>> 201:    Object[] state = (Object[]) stampState;
>>
>> stampState is not an array when casted to an array. The rest of code works
>> with the array "state".
>>
>> The line above is causing me the exception.
>>
>> It seems that this line should be replaced by:
>>
>>   Object state[] = new Object[1];
>>   if (stampState.getClass().isArray())
>>       state = (Object[]) stampState;
>>   else
>>       state[0] = stampState;
>>
>> Please find the patch attached. Someone may have a better idea how to fix
>> the issue.
>>
>> My apologies to Trinidad community for not being able to rectify the
>> defect. It just disappears for unknown reason on the way when I am trying to
>> rectify it.
>>
>> Caused by: java.lang.ClassCastException: Class cannot be casted to array
>>        at
>> org.apache.myfaces.trinidad.component.StampState.restoreChildStampState(StampState.java:201)
>>        at
>> org.apache.myfaces.trinidad.component.UIXTable.restoreStampState(UIXTable.java:426)
>>        at
>> org.apache.myfaces.trinidad.component.UIXCollection._restoreStampState(UIXCollection.java:1813)
>>        at
>> org.apache.myfaces.trinidad.component.UIXCollection.postRowDataChange(UIXCollection.java:809)
>>        at
>> org.apache.myfaces.trinidad.component.UIXCollection.setRowIndex(UIXCollection.java:505)
>>        at
>> org.apache.myfaces.trinidad.component.UIXTable._processStamps(UIXTable.java:517)
>>        at
>> org.apache.myfaces.trinidad.component.UIXTable.processFacetsAndChildren(UIXTable.java:374)
>>        at
>> org.apache.myfaces.trinidad.component.UIXCollection.decodeChildrenImpl(UIXCollection.java:202)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1062)
>>        at
>> org.apache.myfaces.trinidad.component.UIXCollection.processDecodes(UIXCollection.java:196)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1076)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1062)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:888)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1076)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1062)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:888)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1076)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1062)
>>        at
>> org.apache.myfaces.trinidad.component.UIXForm.processDecodes(UIXForm.java:75)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1076)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1062)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:888)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1076)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1062)
>>        at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:888)
>>        at
>> javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:705)
>>        at javax.faces.component.UIViewRoot.access$001(UIViewRoot.java:62)
>>        at javax.faces.component.UIViewRoot$1.process(UIViewRoot.java:121)
>>        at javax.faces.component.UIViewRoot.process(UIViewRoot.java:260)
>>        at
>> javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:117)
>>        at
>> org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
>>        at
>> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
>>        at
>> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
>>        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:178)
>>        ... 22 more
>> ---
>> Sincerely yours
>> Dmitry Barsukov
>>
>
>


-- 
---
Sincerely yours
Dmitry Barsukov

Reply via email to