Servlet.service() Nullpointer

UI Components for JSF
Post Reply
da.dom
Posts: 15
Joined: 07 Jun 2010, 16:21

08 Jun 2010, 12:53

Hi (again :) ),

have an mysterious Error-Message on Server-Error-Log when using the "p:panel" component, build up multiply panels like:

Code: Select all

<h:form>
	<p:panel widgetVar="#{component.clientId}" header="Titel" toggleable="true" toggleSpeed="500" closeSpeed="2000">

		<h:panelGrid columns="2" columnClasses="panelColumnTitle,panelColumnValue">
			<h:outputText value="Test" />
			<h:outputText value="Test" />
			<c:forEach items="#{items}" var="item">
				<h:outputText value="#{item.value}"" />
				<h:outputText value="0" />
			</c:forEach>
		</h:panelGrid>


		<f:facet name="options">
			<p:menu>
				<p:submenu label="Task...">
					<p:menuitem onclick="#{component.parent.clientId}.close()" value=" book" icon="#{resource['images:apply.png']}" action="#handler.do(item)}" />
				</p:submenu>
			</p:menu>
		</f:facet>
	</p:panel>
</h:form>
Throws on on rendering time for every p:panel - Component:
Error:
WARNUNG: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at com.sun.faces.lifecycle.RestoreViewPhase.notifyAfter(RestoreViewPhase.java:275)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)

Until now i recognize no functional errors in the application, just the message above on error server log.

System:
primefaces 2.0.2
jsf 2.0
Mojarra 2.0.3 (SNAPSHOT 20100530)
on Glassfish v3

thanks (again...)
Dom

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

08 Jun 2010, 13:13

Can you use other PrimeFaces components, there is no PrimeFaces class in stack trace so I can't figure out what's wrong.

da.dom
Posts: 15
Joined: 07 Jun 2010, 16:21

08 Jun 2010, 14:25

cagatay.civici wrote:other PrimeFaces components
I tested in the same position (in a c:foreach loop)

a standard h:outputText works
a p:rating works

and here maybe the tip to locate the problem a little bit better
a p:panel without Option-menue works

so the problem must be somewhere here (in my code or behine the scenes):

Code: Select all

<f:facet name="options">
	<p:menu>
		<p:submenu label="Tasks...">
			<p:menuitem onclick="#{component.parent.clientId}.close()" value=" book" icon="#{resource['images:apply.png']}" action="#{bean.book(item)}" />
		</p:submenu>
	</p:menu>
</f:facet>
and again seriously i can't figure out any functional problems...strange..

thanks
Dom

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

09 Jun 2010, 10:03

Why do you use #{component.parent.clientId}.close()? You can use widgetVar of panel.close() It will try to close submenu in your case.

da.dom
Posts: 15
Joined: 07 Jun 2010, 16:21

09 Jun 2010, 11:15

cagatay.civici wrote:Why do you use #{component.parent.clientId}.close()?
The widgetvar - Variable is declared as follows:

Code: Select all

<p:panel widgetVar="#{component.clientId}"...
i use the auto generated clientID of JSF for the WidgetVariable becuase i am using as mentioned an c:forearch loop do generate a various count of panels. The declaration seems to work, the panel gets closed...

Dom

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

21 Jan 2011, 13:02

It was a mojarra issue, see;

http://java.net/jira/browse/JAVASERVERFACES-1764

Try updating to 2.0.4

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 31 guests