tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43758] New: - java.lang.NullPointerException from org.apache.jasper.compiler.ServletWriter.printMultiLn() on validation of JSPX with empty <jsp:scriptlet> element
Date Wed, 31 Oct 2007 18:58:07 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43758>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43758

           Summary: java.lang.NullPointerException from
                    org.apache.jasper.compiler.ServletWriter.printMultiLn()
                    on validation of JSPX with empty <jsp:scriptlet> element
           Product: Tomcat 6
           Version: 6.0.13
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: minor
          Priority: P3
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: Alexander.Chernikov@jetbrains.com


Provided a JSPX with empty jsp:scriptlet element:

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns="http://www.w3.org/1999/xhtml" version="2.0">
<jsp:scriptlet></jsp:scriptlet>
<html>
<head><title>Simple jspx page</title></head>
<body>Place content here</body>
</html>
</jsp:root>

Validated this with Jasper using ant task, similar to one described in
http://tomcat.apache.org/tomcat-4.1-doc/jasper-howto.html (adjusted to Tomcat 6,
of course). Got the trace:

java.lang.NullPointerException
	at org.apache.jasper.compiler.ServletWriter.printMultiLn(ServletWriter.java:169)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:883)
	at org.apache.jasper.compiler.Node$Scriptlet.accept(Node.java:915)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2397)
	at org.apache.jasper.compiler.Node$JspRoot.accept(Node.java:566)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
	at org.apache.jasper.compiler.Generator.generate(Generator.java:3374)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:210)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
	at org.apache.jasper.JspC.processFile(JspC.java:1007)
	at org.apache.jasper.JspC.execute(JspC.java:1156)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:134)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
	at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.Main.runBuild(Main.java:698)
	at org.apache.tools.ant.Main.startAnt(Main.java:199)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)

Without <jsp:scriptlet></jsp:scriptlet> there is no problem.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message