The exception is due to the CollectionModel inside the
ChildPropertyTreeModel being null. This is the function that is
returning null (if the stack trace line numbers match the trunk line
numbers):

  private CollectionModel _getModel()
  {
    Node node = _getCurrentNode();
    CollectionModel model = node.childModel;

    if (model == null)
    {
      Object value = getChildData(node.parentData);
      model = createChildModel(value);
      node.childModel = model;
    }
    return model;
  }

I don't see how this can return null as the createChildModel never returns null:

  protected CollectionModel createChildModel(Object childData)
  {
    CollectionModel model = ModelUtils.toCollectionModel(childData);
    model.setRowIndex(-1);
    return model;
  }

Can you step through this with a debugger or recompile trinidad with
some System.out.println statements to tell us what may be going on?

Also try the latest snapshot and see if that helps (at the very least
it will give us a more accurate set of line numbers).

-Andrew



On Wed, Oct 8, 2008 at 6:12 AM, Rottstock, Sven
<[EMAIL PROTECTED]> wrote:
> Hi Matthias,
>
> This is exaclty my problem - I'm unable to reproduce this behaviour and I 
> cannot imagine in which cases it can occur. So I have no test-cases for that. 
> Sorry :-(
>
> Of course, I can add a null pointer check in the code and can ask the 
> customer to try the fix, but IMO it would be very interesting why we have a 
> null pointer. It seems that the model was not correctly created, is it? 
> Furthermore it would be very interesting why it only happens in a customer 
> environment and why it is working well for me.
>
> Regards,
>
> Sven
>
>>
> JETZT ANMELDEN: SunGard FINANZ-TAG 2008 . www.sungard.de/finanztag
> Complexity, Compliance & Cost: Globale Herausforderungen und lokale Lösungen
> 22. Oktober 2008 . Frankfurt am Main
>
> _______________________________
> Think before you print
> CONFIDENTIALITY: This e-mail (including any attachments) may contain 
> confidential, proprietary and privileged information, and unauthorized 
> disclosure or use is prohibited.  If you receive this e-mail in error, please 
> notify the sender and delete this e-mail from your system.
>
> SunGard Systeme GmbH  Registered Frankfurt am Main, Handelsregister Frankfurt 
> HRB 56839  Geschäftsführer Harold Finders, Thorsten Junike, Dr. Dirk Lüth, 
> Michael Joseph Ruane, Victoria Elizabeth Silbey
>
> -----Ursprüngliche Nachricht-----
>> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
>> Auftrag von Matthias Wessendorf
>> Gesendet: Mittwoch, 8. Oktober 2008 13:11
>> An: MyFaces Discussion
>> Betreff: Re: [Trinidad] EvaluationException in XMLMenuModel
>>
>> Hi Sven,
>>
>> I see this very *deep* in the stack trace:
>>
>> Caused by: java.lang.NullPointerException
>>        at
>> org.apache.myfaces.trinidad.model.ChildPropertyTreeModel._getM
>> odel(Child
>> PropertyTreeModel.java:362)
>>        at
>> org.apache.myfaces.trinidad.model.ChildPropertyTreeModel.getRo
>> wCount(Chi
>> ldPropertyTreeModel.java:196)
>>        at
>> org.apache.myfaces.trinidad.model.BaseMenuModel.getRowCount(Ba
>> seMenuMode
>> l.java:70)
>>
>> I wonder if you have a (reproducible) test-case for that ?
>>
>> -Matthias
>>
>> On Wed, Oct 8, 2008 at 1:05 PM, Rottstock, Sven
>> <[EMAIL PROTECTED]> wrote:
>> > Hi everybody,
>> >
>> > i have a strange behaviour in my JSF application. For me all works
>> > fine but some customers get a very sporadic
>> EvaluationException during
>> > page rendering (see the stack trace below). Has anybody any
>> pointers
>> > for me how I can fix the trouble or has somebody the same issue?
>> >
>> > I'm using:
>> > * MyFaces 1.1.5
>> > * Trinidad 1.0.3 (but IMO it should also happen in newer versions)
>> > * Facelets 1.1.14
>> > * Tomcat 5.5
>> >
>> > SCHWERWIEGEND: Error Rendering View[/portal.xhtml]
>> > javax.faces.el.EvaluationException: /portal.xhtml @44,96
>> > rendered="#{portalMenuModel.rowCount > 0}": Exception
>> getting value of
>> > property rowCount of base of type :
>> > org.apache.myfaces.trinidad.model.XMLMenuModel
>> >        at
>> >
>> com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBin
>> ding.java:
>> > 60)
>> >        at
>> >
>> org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanIm
>> > pl
>> > .java:68)
>> >        at
>> >
>> org.apache.myfaces.trinidad.component.UIXComponentBase.getBooleanPrope
>> > rt
>> > y(UIXComponentBase.java:1127)
>> >        at
>> >
>> org.apache.myfaces.trinidad.component.UIXComponentBase.isRendered(UIXC
>> > om
>> > ponentBase.java:352)
>> >        at
>> >
>> org.apache.myfaces.trinidad.render.CoreRenderer.getRenderedChildCount(
>> > Co
>> > reRenderer.java:493)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPan
>> > eR
>> > enderer._getItemCount(NavigationPaneRenderer.java:349)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPan
>> > eR
>> > enderer.encodeAll(NavigationPaneRenderer.java:92)
>> >        at
>> >
>> org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer
>> > .j
>> > ava:220)
>> >        at
>> >
>> org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXCo
>> > mp
>> > onentBase.java:710)
>> >        at
>> >
>> org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXColle
>> > ct
>> > ion.java:525)
>> >        at
>> >
>> org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRender
>> > er
>> > .java:299)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLay
>> > ou
>> > tRenderer.encodeChild(PanelGroupLayoutRenderer.java:188)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLay
>> > ou
>> > tRenderer._encodeChildren(PanelGroupLayoutRenderer.java:154)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLay
>> > ou
>> > tRenderer.encodeAll(PanelGroupLayoutRenderer.java:106)
>> >        at
>> >
>> org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer
>> > .j
>> > ava:220)
>> >        at
>> >
>> org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXCo
>> > mp
>> > onentBase.java:710)
>> >        at
>> >
>> org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderU
>> > ti
>> > ls.java:69)
>> >        at
>> >
>> org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRender
>> > er
>> > .java:294)
>> >        at
>> >
>> org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(Core
>> > Re
>> > nderer.java:316)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialR
>> > oo
>> > tRenderer.renderContent(PanelPartialRootRenderer.java:64)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.
>> > re
>> > nderContent(BodyRenderer.java:139)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialR
>> > oo
>> > tRenderer.encodeAll(PanelPartialRootRenderer.java:119)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.
>> > en
>> > codeAll(BodyRenderer.java:79)
>> >        at
>> >
>> org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreR
>> > en
>> > derer.java:330)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRende
>> > re
>> > r.encodeAll(DocumentRenderer.java:80)
>> >        at
>> >
>> org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer
>> > .j
>> > ava:220)
>> >        at
>> >
>> org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXCo
>> > mp
>> > onentBase.java:710)
>> >        at
>> >
>> com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSup
>> > po
>> > rt.java:252)
>> >        at
>> >
>> com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSup
>> > po
>> > rt.java:249)
>> >        at
>> >
>> com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java
>> > :5
>> > 94)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.render
>> > Vi
>> > ew(ViewHandlerImpl.java:182)
>> >        at
>> >
>> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResp
>> > on
>> > seExecutor.java:41)
>> >        at
>> >
>> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:1
>> > 32
>> > )
>> >        at
>> > javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
>> >        at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> > ca
>> > tionFilterChain.java:252)
>> >        at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> > lt
>> > erChain.java:173)
>> >        at
>> >
>> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsF
>> > il
>> > ter.java:147)
>> >        at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> > ca
>> > tionFilterChain.java:202)
>> >        at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> > lt
>> > erChain.java:173)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterLi
>> > st
>> > Chain.doFilter(TrinidadFilterImpl.java:293)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeD
>> > oF
>> > ilter(TrinidadFilterImpl.java:253)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilte
>> > rI
>> > mpl(TrinidadFilterImpl.java:210)
>> >        at
>> >
>> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter
>> > (T
>> > rinidadFilterImpl.java:164)
>> >        at
>> >
>> org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFil
>> > te
>> > r.java:92)
>> >        at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> > ca
>> > tionFilterChain.java:202)
>> >        at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> > lt
>> > erChain.java:173)
>> >        at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> > ca
>> > tionFilterChain.java:202)
>> >        at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> > lt
>> > erChain.java:173)
>> >        at
>> >
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
>> > lv
>> > e.java:213)
>> >        at
>> >
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
>> > lv
>> > e.java:178)
>> >        at
>> >
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
>> > va
>> > :126)
>> >        at
>> >
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
>> > va
>> > :105)
>> >        at
>> >
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
>> gineValve.
>> > java:107)
>> >        at
>> >
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>> > :1
>> > 48)
>> >        at
>> >
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
>> > 86
>> > 9)
>> >        at
>> >
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.pr
>> > oc
>> > essConnection(Http11BaseProtocol.java:664)
>> >        at
>> >
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoi
>> > nt
>> > .java:527)
>> >        at
>> >
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFoll
>> > ow
>> > erWorkerThread.java:80)
>> >        at
>> >
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo
>> > ol
>> > .java:684)
>> >        at java.lang.Thread.run(Unknown Source) Caused by:
>> > javax.faces.el.EvaluationException: Bean:
>> > org.apache.myfaces.trinidad.model.XMLMenuModel, property: rowCount
>> >        at
>> >
>> org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolve
>> > rI
>> > mpl.java:461)
>> >        at
>> >
>> org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverIm
>> > pl
>> > .java:85)
>> >        at
>> >
>> com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyEL
>> > Co
>> > ntext.java:141)
>> >        at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
>> >        at
>> > com.sun.el.parser.AstGreaterThan.getValue(AstGreaterThan.java:20)
>> >        at
>> >
>> com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
>> >        at
>> >
>> com.sun.facelets.el.TagValueExpression.getValue(TagValueExpres
>> sion.java:
>> > 71)
>> >        at
>> >
>> com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBin
>> ding.java:
>> > 56)
>> >        ... 61 more
>> > Caused by: java.lang.reflect.InvocationTargetException
>> >        at
>> sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
>> > Source)
>> >        at java.lang.reflect.Method.invoke(Unknown Source)
>> >        at
>> >
>> org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolve
>> > rI
>> > mpl.java:457)
>> >        ... 68 more
>> > Caused by: java.lang.NullPointerException
>> >        at
>> >
>> org.apache.myfaces.trinidad.model.ChildPropertyTreeModel._getModel(Chi
>> > ld
>> > PropertyTreeModel.java:362)
>> >        at
>> >
>> org.apache.myfaces.trinidad.model.ChildPropertyTreeModel.getRowCount(C
>> > hi
>> > ldPropertyTreeModel.java:196)
>> >        at
>> >
>> org.apache.myfaces.trinidad.model.BaseMenuModel.getRowCount(BaseMenuMo
>> > de
>> > l.java:70)
>> >        ... 72 more
>> >
>> > Regards,
>> >
>> > Sven
>> >
>> > JETZT ANMELDEN: SunGard FINANZ-TAG 2008 . www.sungard.de/finanztag
>> > Complexity, Compliance & Cost: Globale Herausforderungen und lokale
>> > Losungen 22. Oktober 2008 . Frankfurt am Main
>> >
>> > _______________________________
>> > Think before you print
>> > CONFIDENTIALITY: This e-mail (including any attachments)
>> may contain confidential, proprietary and privileged
>> information, and unauthorized disclosure or use is
>> prohibited.  If you receive this e-mail in error, please
>> notify the sender and delete this e-mail from your system.
>> >
>> > SunGard Systeme GmbH  Registered Frankfurt am Main, Handelsregister
>> > Frankfurt HRB 56839  Geschaftsfuhrer Harold Finders,
>> Thorsten Junike,
>> > Dr. Dirk Luth, Michael Joseph Ruane, Victoria Elizabeth Silbey
>> >
>> >
>> >
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>
>

Reply via email to