I think, therefore I blog

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. Since he left Australia in 2009, he has been living as a digital nomad in over 40 different countries around the world. Roger is addicted to surfing. His other interests are music, psychology, languages, and finding good food. Click here to subscribe to his weekly blog, or stalk him on Facebook and Twitter.

Leave a Comment

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

Comment posted by: , 4 years ago

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

Join Over 1000 Subscribers

I write every Sunday about travel, psychology, and technology. Thousands of people just like you have already subscribed—and for good reason. It'll change your life. And it's free :)

Read a Good Book

“A spellbinding true story of love, passion and adventure. One can’t help but be swept away by 100% Love Guaranteed.” —Dr Tammie Matson, author of Elephant Dance.

Chat For A While

Your Vote Matters

Which animal will take over when humans go extinct?