Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Debug mode to show runtime errors using catalina debug?

Posted on 2003-12-09
Medium Priority
Last Modified: 2008-02-26
Hi experts, this is a rather simple question i  guess, but i need some help on this as i'm a newbie to tomcat and jsp in general.

Currently i am running tomcat 4.0.6. All i do is start it up and i get

Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6

I understand theres a way i can load up tomcat in a debug mode which should show errors/activities when my jsp code is being processed. I've been taught using

catalina jpda start or
catalina debug >> followed by "run"

to enter debug mode
however, these two commands dont seem to have any effect on my tomcat console. is there anything wrong?
Question by:lodelode
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
LVL 15

Expert Comment

ID: 9904799
Do you mean you want to set the Logger up to give you more information (inside your <Context>) ?


Author Comment

ID: 9904849
i'm looking for something like a jboss console where all the processing activities are shown.

pardon my lack of knowledge with regards to the Logger you have provided, it seems a little high end for me.

to put things short, i would want what is stored in my log files to be directly shown in the tomcat console..


Files\Apache Tomcat 4.0\webapps\webdav
2003-12-09 23:13:02 WebappLoader[/webdav]: Deploying class repositories to work directory C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\webdav
2003-12-09 23:13:02 StandardManager[/webdav]: Seeding random number generator class java.security.SecureRandom
2003-12-09 23:13:02 StandardManager[/webdav]: Seeding of random number generator has been completed
2003-12-09 23:13:03 ContextConfig[/webdav]: Added certificates -> request attribute Valve
2003-12-09 23:13:03 StandardWrapper[/webdav:default]: Loading container servlet default
2003-12-09 23:13:03 StandardWrapper[/webdav:invoker]: Loading container servlet invoker
2003-12-09 23:13:11 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
javax.servlet.ServletException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused: connect
      at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
      at org.apache.jsp.TMP7kzpwpmvjy$jsp._jspService(TMP7kzpwpmvjy$jsp.java:90)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
      at java.lang.Thread.run(Thread.java:536)
----- Root Cause -----
java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused: connect
      at com.mysql.jdbc.Connection.createNewIO(Connection.java:1622)
      at com.mysql.jdbc.Connection.<init>(Connection.java:491)
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
      at java.sql.DriverManager.getConnection(DriverManager.java:512)
      at java.sql.DriverManager.getConnection(DriverManager.java:171)
      at org.apache.jsp.TMP7kzpwpmvjy$jsp._jspService(TMP7kzpwpmvjy$jsp.java:61)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

instead of having to constantly look at the log file to see what happened, i'd like to debug the error by viewing it from the tomcat console itself. any suggestions?
LVL 15

Expert Comment

ID: 9904914
Hmm.  Tricky one.  Since I use Linux, I would do the following:

tail -f /var/tomcat4/logs/catalina.out

This displays the end of the file (tail) and each time something is added, this is also displayed (-f).  You may be able to do this under Windows with something called cygwin, but I'm not sure how.


Maybe kennethxu might know (he's bound to have a look at this question before long ;-))
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 9904949
thanks tho.

just wondering if u're sure of what

catalina jpda start

does? i was told it would engage in some debug mode. but nothing changes in my tomcat console
LVL 15

Accepted Solution

jimmack earned 200 total points
ID: 9905042
I've never used anything like this myself, however, according to a very brief scan through this article:


It seems that the start line that you are using allows a remote debugger to be used for the servlet container.

It doesn't seem to have anything to do with output to a console.

There are some other articles about it on google.  You might have some luck if you check through some of them:

LVL 15

Expert Comment

ID: 10141132

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes Administrators rights are not enough. These cases call for the SYSTEM account. The process in this article outlines the steps required to execute commands using the SYSTEM account.
Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question