<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Menuitem throwing NullPointerException"]]></title>
		<link>http://jforum.icesoft.org/JForum/posts/list/22.page</link>
		<description><![CDATA[Latest messages posted in the topic "Menuitem throwing NullPointerException"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Menuitem throwing NullPointerException</title>
				<description><![CDATA[ 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:
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
               &lt;ice:menuBar id="menuBar"&gt;
                  &lt;ice:menuItem id="menuCadastro" value="Cadastro"&gt;
                           &lt;ice:menuItem value="Bairro" id="menuIPTUCadastroBairro" link="/tributos/BairroList.seam"&gt;
                               &lt;s:conversationPropagation type="none"/&gt;
                     &lt;/ice:menuItem&gt;
                  &lt;/ice:menuItem&gt;
               &lt;/ice:menuBar&gt;
</pre>
		</div>

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:

<blockquote>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
&nbsp;
		</blockquote>

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]]></description>
				<guid isPermaLink="true">http://jforum.icesoft.org/JForum/posts/list/14242.page#54970</guid>
				<link>http://jforum.icesoft.org/JForum/posts/list/14242.page#54970</link>
				<pubDate><![CDATA[Mon, 10 Aug 2009 09:32:40]]> GMT</pubDate>
				<author><![CDATA[ hfilho]]></author>
			</item>
			<item>
				<title>Re:Menuitem throwing NullPointerException</title>
				<description><![CDATA[ Did you ensure that your menuItem was encased in a form?]]></description>
				<guid isPermaLink="true">http://jforum.icesoft.org/JForum/posts/list/14242.page#55012</guid>
				<link>http://jforum.icesoft.org/JForum/posts/list/14242.page#55012</link>
				<pubDate><![CDATA[Tue, 11 Aug 2009 07:32:50]]> GMT</pubDate>
				<author><![CDATA[ judy.guglielmin]]></author>
			</item>
			<item>
				<title>Re:Menuitem throwing NullPointerException</title>
				<description><![CDATA[ sorry...that should have read the menuBar component encased within a form.]]></description>
				<guid isPermaLink="true">http://jforum.icesoft.org/JForum/posts/list/14242.page#55013</guid>
				<link>http://jforum.icesoft.org/JForum/posts/list/14242.page#55013</link>
				<pubDate><![CDATA[Tue, 11 Aug 2009 07:33:31]]> GMT</pubDate>
				<author><![CDATA[ judy.guglielmin]]></author>
			</item>
			<item>
				<title>Re:Menuitem throwing NullPointerException</title>
				<description><![CDATA[ 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]]></description>
				<guid isPermaLink="true">http://jforum.icesoft.org/JForum/posts/list/14242.page#55035</guid>
				<link>http://jforum.icesoft.org/JForum/posts/list/14242.page#55035</link>
				<pubDate><![CDATA[Tue, 11 Aug 2009 15:46:22]]> GMT</pubDate>
				<author><![CDATA[ hfilho]]></author>
			</item>
	</channel>
</rss>
