myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeanne Waldman <jeanne.wald...@oracle.com>
Subject [TRINIDAD] - NPE if faces-config's default-renderkit-id is unknown
Date Sat, 15 Aug 2009 00:57:21 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
If I change Trinidad's demo faces-config.xml file to use a bogus
default-render-kit-id, I get a NPE.<br>
<br>
    &lt;!-- Use the Trinidad RenderKit --&gt;<br>
    &lt;default-render-kit-id&gt;<br>
      org.apache.myfaces.trinidad.coreBAD<br>
    &lt;/default-render-kit-id&gt;<br>
<br>
I get this:<br>
<br>
java.lang.NullPointerException<br>
    at
com.sun.faces.renderkit.RenderKitUtils.getResponseStateManager(RenderKitUtils.java:246)<br>
    at
com.sun.faces.lifecycle.RestoreViewPhase.isPostback(RestoreViewPhase.java:267)<br>
    at
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:172)<br>
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)<br>
    at
com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)<br>
    Truncated. see log file for complete stacktrace<br>
&gt; <br>
<br>
This seems to me to be a bug in
com.sun.faces.renderkit.RenderKitUtils.getResponseStateManager:
<pre><a name="241">3                   renderKit = factory.getRenderKit(context,
renderKitId);
  244               }
  245           }
  246           return renderKit.getResponseStateManager();
</a></pre>
<br>
Has anyone seen this or have an opinion about this? I would have liked
to have had a log message telling me why I got a NPE at least so I
didn't have to track it down.<br>
<br>
I suppose I could write out a warning message in Trinidad's
FacesContextFactoryImpl.java if it returns null.<br>
<br>
Thanks,<br>
Jeanne<br>
<br>
</body>
</html>

Mime
View raw message