Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
[GLASSFISH-21388] NullPointerException at org.apache.jasper.compiler.TagLibraryInfoImpl.toString Created: 08/Jul/15 Status: Project: Component/s: Affects Version/s: Fix Version/s: Open glassfish web_container 3.1.2 Type: Reporter: Resolution: Labels: Remaining Estimate: Time Spent: Original Estimate: Bug Cai_Ming Unresolved waiting_on_filer Not Specified Issuezilla Id: Tags: 21,388 <validator>, TLD Updated: 31/Mar/17 None Priority: Assignee: Votes: Major rutujay 0 Not Specified Not Specified Description When I accessed my applicaton,I've got such error message: <pre> -------------------------------[#|2015-0707T11:22:40.765+0800|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.we 27;|ApplicationDispatcher[/sample] PWC1231: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.jasper.compiler.TagLibraryInfoImpl.toString(TagLibraryInfoImpl.java:129) at java.lang.String.valueOf(String.java:2826) at java.lang.StringBuilder.append(StringBuilder.java:115) at java.util.AbstractMap.toString(AbstractMap.java:490) at java.lang.String.valueOf(String.java:2826) at java.lang.StringBuffer.append(StringBuffer.java:219) at org.apache.jsp.request_jsp._jspService(request_jsp.java from :68) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) -------------------------------</pre> The following is the coding of the org.apache.jasper.compiler.TagLibraryInfoImpl.toString. <pre> -------------------------------public String toString() { StringWriter sw = new StringWriter(); PrintWriter out = new PrintWriter(sw); print("tlibversion", tlibversion, print("shortname", shortname, out); print("urn", urn, out); print("info", info, out); print("uri", uri, out); LINRE12 tagLibraryValidator.toString(), out); for(int i = 0; i < tags.length; i++) out.println(tags[i].toString()); for(int i = 0 out.println(tagFiles[i].toString()); for(int i = 0; i < functions.length; i++) out.println(functions[i].toString()); retu -------------------------------</pre> LINRE129 is the place where the NullPointerException happened. In my application,the element of <validator> is not defined in the TLD file. as we know,if we don't want to test the TagLibrary, there is no necessary to define the element of <validator>. So,the phenomenon is a glassfish internal bug? For this problem,Tomcat modified. The following is modified details. https://svn.apache.org/viewvc?view=revision&revision=306188 So, the LINRE129 should also be modified to [print("tagLibraryValidator", "" + tagLibraryValidator, out);] in the glassfish? </pre> Comments Comment by rutujay [ 31/Mar/17 ] Please provide an application and steps to reproduce the problem. Generated at Thu May 04 06:28:39 UTC 2017 using JIRA 6.2.3#6260sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.