Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Name of the file where error encountered - Tomcat 4.1.12 error console

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am having a major problem debugging my JSP's in Tomcat 4.1.12. We are making
some changes to an application already working on Model 1 architecture.
We are using JSP's , JavaBeans and an SQL Server D/B.It was deployed on Tomcat 3.2.3
and was working fine. I just wanted to make the changes and test it on Tomcat 4.1.12.
IN Tomcat 3.2.3 if an error was encountered by the java bean , while making a JDBC call
or executing a query the name of the bean and the line number would be displayed on the error console . It was easy to look into the bean and make changes.
I dont see the name of the class file or the method name in Tomcat 4.I also tried changing the logging verbosity levels in server.xml.The console shows a lot of connectors and adapters but does not ever give clue where the problem is.
Can some one tell me , is this feature disabled or am I missing something.

Thanks in Advance.
 
Ranch Hand
Posts: 209
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had no problem with my tomcat 4.
how did you log the errors?
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked in catalina.out ?

Also, if you configure your web application in server.xml, you can specify your own log filename for that web application. The examples in server.xml, combined with the documentation should help. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html
 
Ram Balasubramaniam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
This is my server.xml
<!-- Tomcat Root Context -->

<Context path="" docBase="oss" debug="0"
reloadable="true" />

<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_DBOSS_log." suffix=".txt"
verbosity="4" timestamp="true"/>
<Resource name="jdbc/myoracle" auth="Container"
scope="Shareable" type="javax.sql.DataSource"/>

<ResourceParams name="jdbc/myoracle">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter> <name>validationQuery</name>
<value>Select sysdate from Dual</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc racle:thin:@andromeda.worlddata.com:1521:wdiora</value>
</parameter>
<parameter>
<name>username</name>
<value>w_provision</value>
</parameter>
<parameter>
<name>password</name>
<value>w_provision</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
</ResourceParams>

The looging is done to the file I have mentioned in the server.xml but it does not show the class and method responsible for the error.
I am not using any LOG API for the logging since this application is already in production and we were making some changes for it.
Thanks
Ram
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!