Unwrapping JSF java.lang.IllegalArgumentException: null source

By , 21 June 2011

Unwrapping JSF java.lang.IllegalArgumentException: null source

Here's a great mysterious JSF error using Mojarra 2.0.2:

java.lang.IllegalArgumentException: null source
	at java.util.EventObject.<init>(EventObject.java:38)
	at javax.faces.event.SystemEvent.<init>(SystemEvent.java:71)
	at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:73)
	at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:73)
	at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:265)
	at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:251)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at au.com.ninthavenue.webcore.webapp.WebcoreFilter.doFilter(WebcoreFilter.java:452);
Unwrapping JSF java.lang.IllegalArgumentException: null source

The problem is JSF is swallowing the real error as described at http://java.net/jira/browse/JAVASERVERFACES-1758.

So, what to do?

Well, there is a novel solution.

  1. Downgrade to JSF 2.0.2
  2. Check the exception.
  3. Fix the problem.
  4. Upgrade back to JSF 2.0.3

Worked for me, but a freaking lot of work to find a typo in my template.

About Roger Keays

Unwrapping JSF java.lang.IllegalArgumentException: null source

Roger Keays is an artist, an engineer, and a student of life. He has no fixed address and has left footprints on 40-something different countries around the world. Roger is addicted to surfing. His other interests are music, psychology, languages, the proper use of semicolons, and finding good food.

Leave a Comment

Please visit https://rogerkeays.com/unwrapping-jsf-java-lang-illegalargumentexception-null-source to add your comments.

Comment posted by: , 12 years ago

This is still broken in Mojarra 2.1.7, nearly two years after the initial bug report.