[JSFTEMPLATING-45] view handler throws NPE in createView method when viewId is null. Created: 10/Apr/11  Updated: 11/Apr/11  Resolved: 11/Apr/11

Status: Closed
Project: jsftemplating
Component/s: LayoutElements
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Bhavanishankar Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


Attachments: File jsftest.war     Text File server.log    
Issue Links:
blocks GLASSFISH-16336 NPE in Embedded GlassFish while runni... Resolved


As per the API documentation of ViewHandler (http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/javax/faces/application/ViewHandler.html), createView method is NOT supposed throw NPE when viewId is null.

But the jsftemplating does not seem to be compliant with the specification. It throws NPE when createView(facesContext, null) is called.

The other view handler implementation in com.sun.faces:jsf-impl works fine with null viewId. So, it is evident that jsftemplating should also follow the specification.

I have attached a simple application for reproducing the issue. The application bundles jsftemplating.jar and has a Servlet that invokes viewHandler.createView(context, null); When the application is deployed and servlet is accessed, it results in NPE. (You can deploy to GlassFish and access http://localhost:8080/hellojsf/JSFTestServlet).

I have also attached the exception stack trace.

Comment by Bhavanishankar [ 10/Apr/11 ]

Test case and exception stack trace.

Comment by rogerk [ 11/Apr/11 ]

Thanks for the attachments - I'll take a look.

Comment by rogerk [ 11/Apr/11 ]

Hello. This is not a GlassFish bug. In addition, there is no one here that is supporting jsftemplating project. Your best bet is to file an issue in the jsftemplating project: http://java.net/jira/browse/JSFTEMPLATING
I am happy to hear that your application works in mojarra.

Generated at Wed Nov 25 07:49:42 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.