You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "R. Müller" <r....@unicomp-berlin.de> on 2005/11/23 12:36:05 UTC

DataTable again

hi group,

i work with JSF and myfaces since several months and have to point out 
that one of the most weaknesses is, that its sometimes extremly hard to 
figure out what the problem exactly is.
I think it would be high desirable, that there would be more debbuging 
output from the customs components for instance.
I've found a very little use of log4j in the sources, but thats the 
simplest approach to improve this issue.

by the way : no idea whats going on here

I've got a datatable thats display some database information, which will 
delivered from a backing-bean. The website refresh thereself every 
minute. Sometimes the table is not displayed again after the refresh. 
Instead the logs show the following error !?

Any hints ?



2005-11-23 12:14:16 ApplicationDispatcher[/ASM] Servlet.service() for 
servlet jsp threw exception
java.lang.NullPointerException
         at 
org.apache.myfaces.component.html.ext.HtmlDataTableHack.restoreDescendantComponentStates(HtmlDataTableHack.java:245)
         at 
org.apache.myfaces.component.html.ext.HtmlDataTableHack.restoreDescendantComponentStates(HtmlDataTableHack.java:257)
         at 
org.apache.myfaces.component.html.ext.HtmlDataTableHack.restoreDescendantComponentStates(HtmlDataTableHack.java:257)
         at 
org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:208)
         at 
org.apache.myfaces.component.html.ext.HtmlDataTable.setRowIndex(HtmlDataTable.java:127)
         at 
org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:135)
         at 
org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:94)
         at 
org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeChildren(HtmlTableRenderer.java:57)
         at 
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:319)
         at 
javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:343)
         at 
javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:251)
         at 
org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
[...]

Thank you

Ronald

Re: DataTable again

Posted by Mathias Brökelmann <mb...@googlemail.com>.
which version of myfaces do you use? Have you tried the latest nightly?
If that will not fix the issue can you give use your jsp code for the datatable.

2005/11/23, "R. Müller" <r....@unicomp-berlin.de>:
> hi group,
>
> i work with JSF and myfaces since several months and have to point out
> that one of the most weaknesses is, that its sometimes extremly hard to
> figure out what the problem exactly is.
> I think it would be high desirable, that there would be more debbuging
> output from the customs components for instance.
> I've found a very little use of log4j in the sources, but thats the
> simplest approach to improve this issue.
>
> by the way : no idea whats going on here
>
> I've got a datatable thats display some database information, which will
> delivered from a backing-bean. The website refresh thereself every
> minute. Sometimes the table is not displayed again after the refresh.
> Instead the logs show the following error !?
>
> Any hints ?
>
>
>
> 2005-11-23 12:14:16 ApplicationDispatcher[/ASM] Servlet.service() for
> servlet jsp threw exception
> java.lang.NullPointerException
>          at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.restoreDescendantComponentStates(HtmlDataTableHack.java:245)
>          at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.restoreDescendantComponentStates(HtmlDataTableHack.java:257)
>          at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.restoreDescendantComponentStates(HtmlDataTableHack.java:257)
>          at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:208)
>          at
> org.apache.myfaces.component.html.ext.HtmlDataTable.setRowIndex(HtmlDataTable.java:127)
>          at
> org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:135)
>          at
> org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:94)
>          at
> org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeChildren(HtmlTableRenderer.java:57)
>          at
> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:319)
>          at
> javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:343)
>          at
> javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:251)
>          at
> org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
> [...]
>
> Thank you
>
> Ronald
>


--
Mathias

Re: DataTable again

Posted by Simon Kitching <sk...@obsidium.com>.
R. Müller wrote:
> hi group,
> 
> i work with JSF and myfaces since several months and have to point out 
> that one of the most weaknesses is, that its sometimes extremly hard to 
> figure out what the problem exactly is.
> I think it would be high desirable, that there would be more debbuging 
> output from the customs components for instance.
> I've found a very little use of log4j in the sources, but thats the 
> simplest approach to improve this issue.
> 
> by the way : no idea whats going on here
> 
> I've got a datatable thats display some database information, which will 
> delivered from a backing-bean. The website refresh thereself every 
> minute. Sometimes the table is not displayed again after the refresh. 
> Instead the logs show the following error !?
> 
> Any hints ?
> 
> 
> 
> 2005-11-23 12:14:16 ApplicationDispatcher[/ASM] Servlet.service() for 
> servlet jsp threw exception
> java.lang.NullPointerException
>         at 
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.restoreDescendantComponentStates(HtmlDataTableHack.java:245) 
> 

Does your table contain input components? The fact that there are any 
descendant component states to restore suggests it to me.

If the table has input components, then the datamodel that is fetched by 
the datatable after the form is submitted *must be identical* to the one 
present when the table was rendered.

Regards,

Simon

Re: DataTable again

Posted by Martin Marinschek <ma...@gmail.com>.
It's easy to fix that in Open Source..

...help us out by providing logging statements.

I'm sure we'll happily commit them.

regards,

Martin

On 11/23/05, "R. Müller" <r....@unicomp-berlin.de> wrote:
> hi group,
>
> i work with JSF and myfaces since several months and have to point out
> that one of the most weaknesses is, that its sometimes extremly hard to
> figure out what the problem exactly is.
> I think it would be high desirable, that there would be more debbuging
> output from the customs components for instance.
> I've found a very little use of log4j in the sources, but thats the
> simplest approach to improve this issue.
>
> by the way : no idea whats going on here
>
> I've got a datatable thats display some database information, which will
> delivered from a backing-bean. The website refresh thereself every
> minute. Sometimes the table is not displayed again after the refresh.
> Instead the logs show the following error !?
>
> Any hints ?
>
>
>
> 2005-11-23 12:14:16 ApplicationDispatcher[/ASM] Servlet.service() for
> servlet jsp threw exception
> java.lang.NullPointerException
>          at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.restoreDescendantComponentStates(HtmlDataTableHack.java:245)
>          at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.restoreDescendantComponentStates(HtmlDataTableHack.java:257)
>          at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.restoreDescendantComponentStates(HtmlDataTableHack.java:257)
>          at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:208)
>          at
> org.apache.myfaces.component.html.ext.HtmlDataTable.setRowIndex(HtmlDataTable.java:127)
>          at
> org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:135)
>          at
> org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:94)
>          at
> org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeChildren(HtmlTableRenderer.java:57)
>          at
> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:319)
>          at
> javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:343)
>          at
> javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:251)
>          at
> org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
> [...]
>
> Thank you
>
> Ronald
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces