You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Propes, Barry L " <ba...@citi.com> on 2012/02/13 19:16:15 UTC

Tomcat 6.0.26 stopped logging

Hello Tomcat users and developers.

I am using Tomcat 6.0.26 on a few machines - Win XP Pro on two of them, and Windows Server 2003 on the production machine.
Also using jdk1.6.0_18 and was on Ora10g, now 111g.

Today, Tomcat stopped logging on two of the machines, and my servlet that submits to the Oracle DB now fails.

Our IT group upgrade Oracle from 10g to 11g this weekend.

What is odd to me is that I use a Context object for connection on this servlet, as well as a few other JSPs.

The JSPs connect with no issue. The servlet fails. But either way, would this upgrade inhibit Tomcat from logging? That seems strange to me.

My Context object is as follows.

 Context initCtx = new InitialContext();
   Context envCtx = (Context) initCtx.lookup("java:comp/env");
   // Look up our data source
   DataSource ds = (DataSource) envCtx.lookup("jdbc/myoracle");
   // Allocate and use a connection from the pool
   connection = ds.getConnection();

I'm inporting the following:

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.Date;
import java.sql.DriverManager;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;

FYI, this has worked for years prior to this upgrade.

But if anyone sees anyhing amiss out of this, please enlighten me.


Re: Tomcat 6.0.26 stopped logging

Posted by Konstantin Kolinko <kn...@gmail.com>.
Please do not top-post. Answer below.

2012/2/14 Propes, Barry L <ba...@citi.com>:
> Application log, yes...error log.
>
> -----Original Message-----
> From: Pid [mailto:pid@pidster.com]
> Sent: Monday, February 13, 2012 2:37 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 6.0.26 stopped logging
>
> On 13/02/2012 18:16, Propes, Barry L wrote:
>> Hello Tomcat users and developers.
>>
>> I am using Tomcat 6.0.26 on a few machines - Win XP Pro on two of them, and Windows Server 2003 on the production machine.
>> Also using jdk1.6.0_18 and was on Ora10g, now 111g.
>>
>> Today, Tomcat stopped logging on two of the machines, and my servlet that submits to the Oracle DB now fails.
>
> Hi Barry,
>
> I'm not quite clear on what the problem is.  What is logging and what about that is not working?  Application log? Server log?
>
> Where is the database in this picture?
>

Is your hard drive full? Or maybe tomcat does not have write access to
the log directory?

What exactly are the symptoms that you observe?

Best regards,
Konstantin Kolinko

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


RE: Tomcat 6.0.26 stopped logging

Posted by "Propes, Barry L " <ba...@citi.com>.
Application log, yes...error log.

-----Original Message-----
From: Pid [mailto:pid@pidster.com]
Sent: Monday, February 13, 2012 2:37 PM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.26 stopped logging

On 13/02/2012 18:16, Propes, Barry L wrote:
> Hello Tomcat users and developers.
>
> I am using Tomcat 6.0.26 on a few machines - Win XP Pro on two of them, and Windows Server 2003 on the production machine.
> Also using jdk1.6.0_18 and was on Ora10g, now 111g.
>
> Today, Tomcat stopped logging on two of the machines, and my servlet that submits to the Oracle DB now fails.

Hi Barry,

I'm not quite clear on what the problem is.  What is logging and what about that is not working?  Application log? Server log?

Where is the database in this picture?


p

> Our IT group upgrade Oracle from 10g to 11g this weekend.
>
> What is odd to me is that I use a Context object for connection on this servlet, as well as a few other JSPs.
>
> The JSPs connect with no issue. The servlet fails. But either way, would this upgrade inhibit Tomcat from logging? That seems strange to me.
>
> My Context object is as follows.
>
>  Context initCtx = new InitialContext();
>    Context envCtx = (Context) initCtx.lookup("java:comp/env");
>    // Look up our data source
>    DataSource ds = (DataSource) envCtx.lookup("jdbc/myoracle");
>    // Allocate and use a connection from the pool
>    connection = ds.getConnection();
>
> I'm inporting the following:
>
> import java.io.IOException;
> import java.io.PrintWriter;
> import java.sql.Connection;
> import java.sql.Date;
> import java.sql.DriverManager;
> import java.sql.CallableStatement;
> import java.sql.PreparedStatement;
> import java.sql.ResultSet;
> import java.sql.SQLException;
> import java.sql.Statement;
>
> import javax.servlet.RequestDispatcher; import
> javax.servlet.ServletException; import javax.servlet.http.HttpServlet;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import javax.servlet.http.HttpSession;
>
> import javax.naming.Context;
> import javax.naming.InitialContext;
> import javax.naming.NamingException;
> import javax.sql.DataSource;
>
> FYI, this has worked for years prior to this upgrade.
>
> But if anyone sees anyhing amiss out of this, please enlighten me.
>
>


--

[key:62590808]


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


Re: Tomcat 6.0.26 stopped logging

Posted by Pid <pi...@pidster.com>.
On 13/02/2012 18:16, Propes, Barry L wrote:
> Hello Tomcat users and developers.
> 
> I am using Tomcat 6.0.26 on a few machines - Win XP Pro on two of them, and Windows Server 2003 on the production machine.
> Also using jdk1.6.0_18 and was on Ora10g, now 111g.
> 
> Today, Tomcat stopped logging on two of the machines, and my servlet that submits to the Oracle DB now fails.

Hi Barry,

I'm not quite clear on what the problem is.  What is logging and what
about that is not working?  Application log? Server log?

Where is the database in this picture?


p

> Our IT group upgrade Oracle from 10g to 11g this weekend.
> 
> What is odd to me is that I use a Context object for connection on this servlet, as well as a few other JSPs.
> 
> The JSPs connect with no issue. The servlet fails. But either way, would this upgrade inhibit Tomcat from logging? That seems strange to me.
> 
> My Context object is as follows.
> 
>  Context initCtx = new InitialContext();
>    Context envCtx = (Context) initCtx.lookup("java:comp/env");
>    // Look up our data source
>    DataSource ds = (DataSource) envCtx.lookup("jdbc/myoracle");
>    // Allocate and use a connection from the pool
>    connection = ds.getConnection();
> 
> I'm inporting the following:
> 
> import java.io.IOException;
> import java.io.PrintWriter;
> import java.sql.Connection;
> import java.sql.Date;
> import java.sql.DriverManager;
> import java.sql.CallableStatement;
> import java.sql.PreparedStatement;
> import java.sql.ResultSet;
> import java.sql.SQLException;
> import java.sql.Statement;
> 
> import javax.servlet.RequestDispatcher;
> import javax.servlet.ServletException;
> import javax.servlet.http.HttpServlet;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import javax.servlet.http.HttpSession;
> 
> import javax.naming.Context;
> import javax.naming.InitialContext;
> import javax.naming.NamingException;
> import javax.sql.DataSource;
> 
> FYI, this has worked for years prior to this upgrade.
> 
> But if anyone sees anyhing amiss out of this, please enlighten me.
> 
> 


-- 

[key:62590808]


RE: Tomcat 6.0.26 stopped logging

Posted by "Propes, Barry L " <ba...@citi.com>.
Alright, thanks, Konstantin.

-----Original Message-----
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
Sent: Monday, February 13, 2012 3:50 PM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.26 stopped logging

2012/2/14 Propes, Barry L <ba...@citi.com>:
> Well this was odd. To me.
>
> I'm sure some of you will tell me about logging with Log4j or some other logger, or even the use of the Tomcat app manager.
>
> My web.xml file got deleted. I thought, (probably wrongly) that Tomcat's web manager console would alert to such, but it didn't.
>
> Took me a little bit to discover that the darn thing was missing entirely!
>
> Ugh! Got that fixed, and many other ills like this logging thing resumed as they should!
>
> It's ALL working again!
>
> Thank you all!
>

FYI: a web application is valid even if there is no web.xml file.
E.g.: consider the case if you want to publish some static files.

The default conf/web.xml is used in this situation.

Best regards,
Konstantin Kolinko

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


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


Re: Tomcat 6.0.26 stopped logging

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/2/14 Propes, Barry L <ba...@citi.com>:
> Well this was odd. To me.
>
> I'm sure some of you will tell me about logging with Log4j or some other logger, or even the use of the Tomcat app manager.
>
> My web.xml file got deleted. I thought, (probably wrongly) that Tomcat's web manager console would alert to such, but it didn't.
>
> Took me a little bit to discover that the darn thing was missing entirely!
>
> Ugh! Got that fixed, and many other ills like this logging thing resumed as they should!
>
> It's ALL working again!
>
> Thank you all!
>

FYI: a web application is valid even if there is no web.xml file.
E.g.: consider the case if you want to publish some static files.

The default conf/web.xml is used in this situation.

Best regards,
Konstantin Kolinko

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


RE: Tomcat 6.0.26 stopped logging

Posted by "Propes, Barry L " <ba...@citi.com>.
Well this was odd. To me.

I'm sure some of you will tell me about logging with Log4j or some other logger, or even the use of the Tomcat app manager.

My web.xml file got deleted. I thought, (probably wrongly) that Tomcat's web manager console would alert to such, but it didn't.

Took me a little bit to discover that the darn thing was missing entirely!

Ugh! Got that fixed, and many other ills like this logging thing resumed as they should!

It's ALL working again!

Thank you all!

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net]
Sent: Monday, February 13, 2012 3:28 PM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.26 stopped logging

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Barry,

On 2/13/12 1:16 PM, Propes, Barry L wrote:
> I am using Tomcat 6.0.26 on a few machines - Win XP Pro on two of
> them, and Windows Server 2003 on the production machine. Also using
> jdk1.6.0_18 and was on Ora10g, now 111g.

That's quite an upgrade :)

> Today, Tomcat stopped logging on two of the machines, and my servlet
> that submits to the Oracle DB now fails.

Fails in what way? Is an exception thrown? If so, what is the stack trace (or the message if no stack trace is generated)?

> What is odd to me is that I use a Context object for connection on
> this servlet, as well as a few other JSPs.
>
> The JSPs connect with no issue. The servlet fails. But either way,
> would this upgrade inhibit Tomcat from logging? That seems strange to
> me.

Tomcat's logging should not have anything to do with the upgrade of your RDBMS. Did they upgrade anything else along with it?

> My Context object is as follows.
>
> Context initCtx = new InitialContext(); Context envCtx = (Context)
> initCtx.lookup("java:comp/env"); // Look up our data source DataSource
> ds = (DataSource) envCtx.lookup("jdbc/myoracle"); // Allocate and use
> a connection from the pool connection = ds.getConnection();

That looks fairly standard. Do you have the exact same code in both your JSPs (that work) and your servlets (that don't work)? Again, how do you know they don't work?

Is there anything in the logs (hah) that suggests anything is amiss at any point? Funny things start to happen after an OOME, for instance.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk85gHkACgkQ9CaO5/Lv0PBolwCbBSzTpTgfXCHEcc2g/ZV0vr8l
V68AoJB0vq32cuTvA4T9xlh/dmxyRzV3
=eTLa
-----END PGP SIGNATURE-----

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


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


Re: Tomcat 6.0.26 stopped logging

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Barry,

On 2/13/12 1:16 PM, Propes, Barry L wrote:
> I am using Tomcat 6.0.26 on a few machines - Win XP Pro on two of 
> them, and Windows Server 2003 on the production machine. Also
> using jdk1.6.0_18 and was on Ora10g, now 111g.

That's quite an upgrade :)

> Today, Tomcat stopped logging on two of the machines, and my
> servlet that submits to the Oracle DB now fails.

Fails in what way? Is an exception thrown? If so, what is the stack
trace (or the message if no stack trace is generated)?

> What is odd to me is that I use a Context object for connection on 
> this servlet, as well as a few other JSPs.
> 
> The JSPs connect with no issue. The servlet fails. But either way, 
> would this upgrade inhibit Tomcat from logging? That seems strange
> to me.

Tomcat's logging should not have anything to do with the upgrade of your
RDBMS. Did they upgrade anything else along with it?

> My Context object is as follows.
> 
> Context initCtx = new InitialContext(); Context envCtx = (Context)
> initCtx.lookup("java:comp/env"); // Look up our data source 
> DataSource ds = (DataSource) envCtx.lookup("jdbc/myoracle"); //
> Allocate and use a connection from the pool connection =
> ds.getConnection();

That looks fairly standard. Do you have the exact same code in both
your JSPs (that work) and your servlets (that don't work)? Again, how
do you know they don't work?

Is there anything in the logs (hah) that suggests anything is amiss at
any point? Funny things start to happen after an OOME, for instance.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk85gHkACgkQ9CaO5/Lv0PBolwCbBSzTpTgfXCHEcc2g/ZV0vr8l
V68AoJB0vq32cuTvA4T9xlh/dmxyRzV3
=eTLa
-----END PGP SIGNATURE-----

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