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

I guess I'd call myself a problem solver. Either that, or I'm some sort of organic machine designed to convert oxygen into carbon dioxide. You could go either way on that. I'm into languages and stuff. I wrote a book. It's okay, I guess. What else? I like reading, swimming, eating, and playing music. Satisfied? Sheesh.

Leave a Comment

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

Comment posted by: , 5 years ago

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