You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@covalent.net on 2002/06/19 20:55:07 UTC

Jasper error reporting ( was: Re: jk 1.2 freese/snap time in JTC ?)

I believe 'unknown source' is due to the flags set on the compiler,
we need to set debug on and optimization off to get line number in source.

Mapping back to the original line number hasn't been ported yet ( AFAIK ).

Costin

On Wed, 19 Jun 2002, Les Hazlewood wrote:

> I posted this before, but I've received no answer, so hopefully I can get 
> one this time around ;) 
> 
> Tomcat 4.1.3 is NOT giving me line numbers when SQLExceptions are thrown 
> from inside a javabean.  The only time I'm not getting line numbers is when 
> I have a bad query.  This in turn throws an SQLException in my javabean, and 
> the stack trace says "Unknown Source". 
> 
> I decided to stick some junk at the end of an already working query string, 
> so the bean would compile, but there would be a parse error in the sql so I 
> could demonstrate the error. 
> 
> Here is the exception as noted by Tomcat: 
> 
> org.apache.jasper.JasperException: ERROR:  parser: parse error at or near 
> "lalala" 
> 
> 	at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 
> 32)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> <snip> 
> 
> Root Cause: 
> 
> javax.servlet.ServletException: ERROR:  parser: parse error at or near 
> "lalala" 
> 
> 	at 
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp 
> l.java:479)
> 	at org.apache.jsp.main$jsp._jspService(Unknown Source)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
> 
> 
> Under the Root Cause on the second line, why is it saying Unknown Source?  
> In this case of the SQLException I know where the error is occuring, because 
> I purposely put it there for demonstration. 
> 
> However, I'm redoing a lot of my app's SQL code to work with another DB, and 
> every time I get an SQLException, I have NO IDEA which SQL query is giving 
> me the error.  I usually know the bean, but still, this is horrible for 
> debugging. 
> 
> Puhleaaase help in any way that you can.  Im pretty sure this is a bug....am 
> I correct.  Is there a way to report it? 
> 
> Thanks, 
> 
> Les Hazlewood 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Jasper error reporting ( was: Re: jk 1.2 freese/snap time in JTC ?)

Posted by Remy Maucherat <re...@apache.org>.
costinm@covalent.net wrote:
> I believe 'unknown source' is due to the flags set on the compiler,
> we need to set debug on and optimization off to get line number in source.

The default changed to debug ibfo = true in 4.1.5, afaik.

> Mapping back to the original line number hasn't been ported yet ( AFAIK ).

Somehow, I have the impression it still works (when using javac). I have 
no idea why, though, and I didn't try to look into it at all.

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>