Board index JavaServer Faces General Exception handling?

Exception handling?

Components, Ajax Framework, Utilities and More.

Post 07 Apr 2012, 07:46

Posts: 1
Hi,

New user to PrimeFaces here! I've managed to get PF 3.2 running on Mojarra 2.0.3 and tomcat 7.0.26. I was able to render the components successfully. However when I started building more complex components, I'm getting error 500 without much direction. I'm including the error details below. Can someone point me in the right direction where I can find documentation on setting up error handling in the JSFs so I can troubleshoot?

Much appreciated - I'd like to be able to troubleshoot my own mistakes!

- TE


output to browser:
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: null source
javax.faces.webapp.FacesServlet.service(FacesServlet.java:321)
root cause

java.lang.IllegalArgumentException: null source
java.util.EventObject.<init>(EventObject.java:38)
javax.faces.event.SystemEvent.<init>(SystemEvent.java:67)
javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:69)
javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:69)
com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:256)
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:245)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.26 logs.


catalina.out log file:
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/mainsite] threw exception [null source] with root causejava.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(EventObject.java:38)
at javax.faces.event.SystemEvent.<init>(SystemEvent.java:67)
at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:69)
at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:69)
at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:256)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:245)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)


Post 07 Apr 2012, 14:56

Posts: 5985
[PLEASE PLEASE PLEASE READ BEFORE POSTING]

Reply with following using code button (which inserts code tags in editor while you are entering your response):

1. web.xml
2. faces-config.xml
3. all xhtnml (including template)
4. all beans, POJOs
5. which are 'directly related' to this 500 error that you are experiencing

We cannot help you if you don't provide some code/xhtml, web.xml, etc...

Exception handling? did you search google? see below.

Java EE 6 Tutorial: Registering Application Messages

javaee 6 tutorial h:message

balusc.blogspot.com h:message
Howard

PrimeFaces 5.1, Extensions 3.0.0, Push (Atmosphere 2.2.3)
TomEE+ 1.7.1 (Tomcat 7.0.55), MyFaces Core 2.2.6, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Post 07 Apr 2012, 16:07
tandraschko PrimeFaces Core Developer

Posts: 2253
Location: Bavaria, DE

It would upgrade Mojarra first before starting with other stuff.
Always Bet On Prime (+ Extensions)!

PrimeFaces Extensions: https://github.com/primefaces-extensions
OpenWebBeans: http://openwebbeans.apache.org/
DeltaSpike: http://deltaspike.apache.org/
Personal Blog: http://tandraschko.blogspot.de/


Return to General