tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adile Abbadi <>
Subject RE: Error 500 messages
Date Fri, 22 Jul 2005 01:09:58 GMT
Hi Anoop thanx for your help - first in regards to the file that the log is
writing to I'm referring to a log file I created for my context in the XML
supporting that context using the FileLogger (similar to as you have below).

Now I did a little more experimenting and discovered something interesting -
as I said I can get an exception to be thrown to the page in a simple JSP
file (I made it do a null pointer for example) and I can get it do pretty
any other exception as well. Now what I did is I took one my more
complicated JSP pages, made a copy and made a few changes to force some
exceptions - now here is the weird thing - some exceptions are thrown to the
screen and some are not.

For example I had a ResultSet DB object and I made a syntax error and I got
an Error 500 screen to come up as follows (note I took out the extra stuff
to shorten the email)

org.apache.jasper.JasperException: Unable to compile class for JSP

')' expected
	while( {

I also got it do a null pointer exception:


Root Cause

However I tried to get it to do a syntax error in the query - and I end up
with a blank page. The catalina log shows nothing, but my context log shows
the following (clown is the word I used to screw up the query)

javax.servlet.ServletException: ERROR:  syntax error at or near "CLOWN" at
character 260

--Root Cause--
java.sql.SQLException: ERROR:  syntax error at or near "CLOWN" at character

Its almost as it the page refuses to compile with this error.

Any ideas - is it a configuration thing?



-----Original Message-----
From: Anoop kumar V []
Sent: July 21, 2005 6:32 PM
To: Tomcat Users List
Subject: Re: Error 500 messages

It might be easier than you think to output the error right onto the
page itself.

But would it help if you see the errors (+ other things) on the tomcat
console?? It will certainly help in your debugging.....

To do that edit the server.xml in the conf directory and remove lines
similar to this:

      <Logger className="org.apache.catalina.logger.FileLogger"
        prefix="catalina_log." suffix=".txt"

The only problem I have seen when I do this is that a lot of
information prints out on to the console and makes it cluttered - but
my hope is that when you get an error/exception you will be able to
notice it in the console amidst all the other debugging info..... Also
ensure that the debug has the value 0 in the host tag. This will
reduce the amount of debugging info.

Another point I wish to make is that when there is an error tomcat
just writes one file.... I am not sure which files you mention that
tomcat writes....

The easiest thing I do and it works too is that - everything is
outputted into my one output file catalina.out and I use "tail -f
catalina.out" to see what is going on - of course this works only on
*nix servers (pity windows!!)...


On 7/21/05, Adile Abbadi <> wrote:
> Hi all,
> I've got a very simple question to ask and I'm sure someone out there can
> help me. Ok I just migrated from Tomcat 3 to Tomcat 4 and everything is
> working great except one little thing. But a little background before I go
> on.
> Apache/Tomcat4 configuration - using libapache-mod_jk as the connector.
> Running on Linux
> JDK1.4
> My app is built in JSP with JavaBeans in the background. Most of JSP's are
> built as follows
> Container JSP file
> --jsp includes doing different thing like load session variables or nav
> menus, etc.
> Alright so here is the issue - in Tomcat 3 - whenever an error occurred
> as a null pointer, or other exception - the error would output right to
> JSP page itself and I could see it on the screen.
> Now in Tomcat 4 it outputs the error to the log. This is all fine and
> but it makes it hell to try and fix issues having to sift through log
> to figure out what the problem is.
> Now I have tried to build a simple test.jsp file and force it to through
> exception and that works fine (gives me the standard apache/tomcat error
> screen) - but for some reason in the more complicated jsp pages - I can't
> get the exception to come to the screen.
> So any ideas??
> Thanx
> Adile
>   ________________________________
>  Mr. Adile Abbadi-MacIntosh - Chief Technical Officer
>  A: Suite 500 - 400 Crowfoot Cres NW
> Calgary, Alberta, Canada
> T3G 5H6 P: 403.693.2609
>  F: 403.693.2604
>  E: C: 403.383.5285 ________________________________

Thanks and best regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.9.2/54 - Release Date: 7/21/05

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.9.2/54 - Release Date: 7/21/05

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message