Menuitem throwing NullPointerException
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
Menuitem throwing NullPointerException  XML
Forum Index -> JBoss Seam Integration
Author Message
hfilho

Joined: 10/08/2009 00:00:00
Messages: 2
Offline


Hello all,

I'm currently developing a system in JBoss Seam 2.1.2 and ICEFaces 1.8.1.

We have the static menu below:
Code:
                <ice:menuBar id="menuBar">
                   <ice:menuItem id="menuCadastro" value="Cadastro">
                            <ice:menuItem value="Bairro" id="menuIPTUCadastroBairro" link="/tributos/BairroList.seam">
                                <s:conversationPropagation type="none"/>
                      </ice:menuItem>
                   </ice:menuItem>
                </ice:menuBar>
 


This code is in the menu.xhtml of the generated project using seam-gen set for icefaces and jpa in a war, and is included in the standard template for every page.

The menu works perfectly from any page, as do GET calls (mostly s:button and s:link). The problem is when a POST (usually a partial submit) is executed. The following exception is thrown:

10:55:27,250 ERROR [lifecycle] JSF1054: (Phase ID: APPLY_REQUEST_VALUES 2, View ID: /BairroEdit.xhtml) Exception thrown during phase execution: javax.faces.even
t.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1d26b41]
10:55:27,250 ERROR [[Blocking Servlet]] Servlet.service() for servlet Blocking Servlet threw exception
java.lang.RuntimeException: no message available
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:177)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.RewriteFilter.doFilter(RewriteFilter.java:63)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.josso.tc55.agent.SSOAgentValve.invoke(SSOAgentValve.java:274)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at com.icesoft.faces.component.menubar.MenuItemRenderer.deriveCommonHiddenFieldName(MenuItemRenderer.java:276)
at com.icesoft.faces.component.menubar.MenuItemRenderer.decode(MenuItemRenderer.java:92)
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:789)
at com.icesoft.faces.component.menubar.MenuItemBase.processDecodes(MenuItemBase.java:77)
at com.icesoft.faces.component.menubar.MenuItemBase.processDecodes(MenuItemBase.java:73)
at com.icesoft.faces.component.menubar.MenuItemBase.processDecodes(MenuItemBase.java:73)
at com.icesoft.faces.component.menubar.MenuItemBase.processDecodes(MenuItemBase.java:73)
at com.icesoft.faces.component.menubar.MenuBar.processDecodes(MenuBar.java:259)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:540)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:122)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:73)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:28)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:22)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
... 35 more
 


This behavior happens both in long running conversations as in short lived ones, and I just can't figure out what's happening. I've tried changing the conversation settings, including nested and named, but to no avail.

I'd like to point again that this happens when the menu is NOT accessed. It's just a plain POST from a partial submit or a ice:commandButton click. GETs and direct clicks on the menu work just fine.

Any help is very appreciated.


Best regards,

Heliton
judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1196
Offline


Did you ensure that your menuItem was encased in a form?
judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1196
Offline


sorry...that should have read the menuBar component encased within a form.
hfilho

Joined: 10/08/2009 00:00:00
Messages: 2
Offline


Hey Judy, thanks for the prompt reply.

I've tried encapsulating the menu in a form and it worked. But I can't figure out why I'd have to, since it's just a menu and I'm using the link parameter (supposedly generating a GET call).

I read somewhere in the forums that the ICEFaces menu uses POSTs instead of GETs, but would you know why that is? I can't really think of any use case that would require a POST just to move around the site. I'm sure someone must have had a very good reason to design it that way, but it'd be nice to have an option to use GET (and not need to put the menu in a form) for simple purposes like mine. The link option came to mind when I saw it, could leave the action POSTing.

Also I didn't find anything about it on the official documentation. Where would one go about adding it. It's an important piece of information, and I can't believe I'm the first one to have bumped into this problem.


Thanks again,

Heliton
 
Forum Index -> JBoss Seam Integration
Go to:   
Powered by JForum 2.1.7ice © JForum Team