You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chris Moore <ch...@surewest.net> on 2011/11/27 19:29:49 UTC

System.out is not going to catalina.out

 

I'm new to using tomcat.  I've done some developing with Google App Engine,
but I'm looking to

host something on my own system instead of theirs.

 

My system is running Ubuntu 10.04.3.  Tomcat is 6.0.24, JVM is 1.6.0_20-b20.

 

I've written my app using GWT 2.4.0.  I'm also trying to use Hibernate and
MySQL for the back end.

This is my first time with Hibernate as well, so I'm still coming up to
speed with getting that configured

and working.

 

I can run my application in dev mode under Eclipse, with Hibernate
configured to connect to the mysql

server, and it works fine.  But when host the application under Tomcat on
the server it doesn't actually

update the database.  It seems to work, I get no errors or stack traces, but
the data never gets updated.

 

That leads to the real question I'm asking for help with - I can't seem to
get any kind of logging to work,

including simply writing to System.out.  All the documentation I can find
says that System.out should get

written to catalina.out, but I'm not seeing it.   I do see "deploying" and
"undeploying" messages in

catalina.out, so I know I've got the right file and it is getting logged to,
but I don't see anything else there.

 

I've tried changing logging.properties to specify level=ALL for everything,
thinking maybe the output was

getting filtered, but that didn't help.

 

Can anyone suggest what I might be doing wrong?  Is my System.out going
somewhere else?  

 

I'm generally pretty good at working out problems for myself, but with no
error messages and no way to 

get any kind of logging I'm stuck.  If someone could help me at least get
logging working I can probably

work the rest out.

 

Thanks,

 

Chris


Re: System.out is not going to catalina.out

Posted by Mark Thomas <ma...@apache.org>.
On 27/11/2011 18:29, Chris Moore wrote:
>  
> 
> I'm new to using tomcat.  I've done some developing with Google App Engine,
> but I'm looking to
> 
> host something on my own system instead of theirs.
> 
>  
> 
> My system is running Ubuntu 10.04.3.  Tomcat is 6.0.24, JVM is 1.6.0_20-b20.
> 
>  
> 
> I've written my app using GWT 2.4.0.  I'm also trying to use Hibernate and
> MySQL for the back end.
> 
> This is my first time with Hibernate as well, so I'm still coming up to
> speed with getting that configured
> 
> and working.
> 
>  
> 
> I can run my application in dev mode under Eclipse, with Hibernate
> configured to connect to the mysql
> 
> server, and it works fine.  But when host the application under Tomcat on
> the server it doesn't actually
> 
> update the database.  It seems to work, I get no errors or stack traces, but
> the data never gets updated.
> 
>  
> 
> That leads to the real question I'm asking for help with - I can't seem to
> get any kind of logging to work,
> 
> including simply writing to System.out.  All the documentation I can find
> says that System.out should get
> 
> written to catalina.out, but I'm not seeing it.   I do see "deploying" and
> "undeploying" messages in
> 
> catalina.out, so I know I've got the right file and it is getting logged to,
> but I don't see anything else there.
> 
>  
> 
> I've tried changing logging.properties to specify level=ALL for everything,
> thinking maybe the output was
> 
> getting filtered, but that didn't help.
> 
>  
> 
> Can anyone suggest what I might be doing wrong?  Is my System.out going
> somewhere else?  
> 
>  
> 
> I'm generally pretty good at working out problems for myself, but with no
> error messages and no way to 
> 
> get any kind of logging I'm stuck.  If someone could help me at least get
> logging working I can probably
> 
> work the rest out.

Start with a clean Tomcat 7.0.23 install and a simple JSP that writes to
stdout.

Also, check all the other log files.

Mark

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


RE: System.out is not going to catalina.out

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Chris Moore [mailto:chrismoore@surewest.net] 
> Subject: System.out is not going to catalina.out

> I can't seem to get any kind of logging to work,
> including simply writing to System.out.

You really shouldn't be using System.out for logging; you webapp should include a logging framework of your choosing.

However, if you insist, enable the swallowOuput attribute in your webapp's <Context> element.

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Standard_Implementation

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.



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


RE: System.out is not going to catalina.out

Posted by Chris Moore <ch...@surewest.net>.
Thanks to everyone that offered suggestions.  I upgraded to Tomcat 7.  I
tried various logging options, and all kinds of changes to
logging.properties.  I tried changing the way the Tomcat daemon is started.
I tried running Tomcat in the foreground instead of as a daemon.

In the end it turned out to be a stupid mistake, as I suspected it would be.
The problem was in the ant script that was building my WAR.  It was picking
up an old jar instead of the latest files, so I essentially wasn't changing
anything when I made changes and redeployed.

All is working now.  I've got logging working through slf4j, Hibernate is
persisting objects, and everything is good.

Chris

-----Original Message-----
From: Chris Moore [mailto:chrismoore@surewest.net] 
Sent: Sunday, November 27, 2011 10:30 AM
To: users@tomcat.apache.org
Subject: System.out is not going to catalina.out

 

I'm new to using tomcat.  I've done some developing with Google App Engine,
but I'm looking to

host something on my own system instead of theirs.

 

My system is running Ubuntu 10.04.3.  Tomcat is 6.0.24, JVM is 1.6.0_20-b20.

 

I've written my app using GWT 2.4.0.  I'm also trying to use Hibernate and
MySQL for the back end.

This is my first time with Hibernate as well, so I'm still coming up to
speed with getting that configured

and working.

 

I can run my application in dev mode under Eclipse, with Hibernate
configured to connect to the mysql

server, and it works fine.  But when host the application under Tomcat on
the server it doesn't actually

update the database.  It seems to work, I get no errors or stack traces, but
the data never gets updated.

 

That leads to the real question I'm asking for help with - I can't seem to
get any kind of logging to work,

including simply writing to System.out.  All the documentation I can find
says that System.out should get

written to catalina.out, but I'm not seeing it.   I do see "deploying" and
"undeploying" messages in

catalina.out, so I know I've got the right file and it is getting logged to,
but I don't see anything else there.

 

I've tried changing logging.properties to specify level=ALL for everything,
thinking maybe the output was

getting filtered, but that didn't help.

 

Can anyone suggest what I might be doing wrong?  Is my System.out going
somewhere else?  

 

I'm generally pretty good at working out problems for myself, but with no
error messages and no way to 

get any kind of logging I'm stuck.  If someone could help me at least get
logging working I can probably

work the rest out.

 

Thanks,

 

Chris




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


Re: System.out is not going to catalina.out

Posted by André Warnier <aw...@ice-sa.com>.
Konstantin Kolinko wrote:
> 2011/11/27 Chris Moore <ch...@surewest.net>:
>>
>> I'm new to using tomcat.  I've done some developing with Google App Engine,
>> but I'm looking to
>>
>> host something on my own system instead of theirs.
>>
>>
>>
>> My system is running Ubuntu 10.04.3.  Tomcat is 6.0.24, JVM is 1.6.0_20-b20.
>>
>>
>>
>> I've written my app using GWT 2.4.0.  I'm also trying to use Hibernate and
>> MySQL for the back end.
>>
>> This is my first time with Hibernate as well, so I'm still coming up to
>> speed with getting that configured
>>
>> and working.
>>
>>
>>
>> I can run my application in dev mode under Eclipse, with Hibernate
>> configured to connect to the mysql
>>
>> server, and it works fine.  But when host the application under Tomcat on
>> the server it doesn't actually
>>
>> update the database.  It seems to work, I get no errors or stack traces, but
>> the data never gets updated.
>>
>>
>>
>> That leads to the real question I'm asking for help with - I can't seem to
>> get any kind of logging to work,
>>
>> including simply writing to System.out.  All the documentation I can find
>> says that System.out should get
>>
>> written to catalina.out, but I'm not seeing it.   I do see "deploying" and
>> "undeploying" messages in
>>
>> catalina.out, so I know I've got the right file and it is getting logged to,
>> but I don't see anything else there.
>>
>>
>>
>> I've tried changing logging.properties to specify level=ALL for everything,
>> thinking maybe the output was
>>
>> getting filtered, but that didn't help.
>>
>>
>>
>> Can anyone suggest what I might be doing wrong?  Is my System.out going
>> somewhere else?
>>
>>
>>
>> I'm generally pretty good at working out problems for myself, but with no
>> error messages and no way to
>>
>> get any kind of logging I'm stuck.  If someone could help me at least get
>> logging working I can probably
>>
>> work the rest out.
>>
> 
> Just guessing:
> a) you are not using the configuration that you are think that you are using
> b) you do not have enough rights or disk space to write to catalina.out file
> 
> You apparently are using 3-rd party repackaged and outdated
> distribution of Tomcat. I'd be better to download proper 6.0.33 from
> tomcat.apache.org and install it.
> 
> 
I will make another guess for now :
As your Tomcat is running under an Ubuntu, have a look at the script which starts Tomcat 
(probably /etc/init.d/tomcat6).  Tomcat probably runs under jsvc, and its stdout/stderr is 
redirected (also guessing) to /var/log/daemon.log or similar.


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


Re: System.out is not going to catalina.out

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/11/27 Chris Moore <ch...@surewest.net>:
>
>
> I'm new to using tomcat.  I've done some developing with Google App Engine,
> but I'm looking to
>
> host something on my own system instead of theirs.
>
>
>
> My system is running Ubuntu 10.04.3.  Tomcat is 6.0.24, JVM is 1.6.0_20-b20.
>
>
>
> I've written my app using GWT 2.4.0.  I'm also trying to use Hibernate and
> MySQL for the back end.
>
> This is my first time with Hibernate as well, so I'm still coming up to
> speed with getting that configured
>
> and working.
>
>
>
> I can run my application in dev mode under Eclipse, with Hibernate
> configured to connect to the mysql
>
> server, and it works fine.  But when host the application under Tomcat on
> the server it doesn't actually
>
> update the database.  It seems to work, I get no errors or stack traces, but
> the data never gets updated.
>
>
>
> That leads to the real question I'm asking for help with - I can't seem to
> get any kind of logging to work,
>
> including simply writing to System.out.  All the documentation I can find
> says that System.out should get
>
> written to catalina.out, but I'm not seeing it.   I do see "deploying" and
> "undeploying" messages in
>
> catalina.out, so I know I've got the right file and it is getting logged to,
> but I don't see anything else there.
>
>
>
> I've tried changing logging.properties to specify level=ALL for everything,
> thinking maybe the output was
>
> getting filtered, but that didn't help.
>
>
>
> Can anyone suggest what I might be doing wrong?  Is my System.out going
> somewhere else?
>
>
>
> I'm generally pretty good at working out problems for myself, but with no
> error messages and no way to
>
> get any kind of logging I'm stuck.  If someone could help me at least get
> logging working I can probably
>
> work the rest out.
>

Just guessing:
a) you are not using the configuration that you are think that you are using
b) you do not have enough rights or disk space to write to catalina.out file

You apparently are using 3-rd party repackaged and outdated
distribution of Tomcat. I'd be better to download proper 6.0.33 from
tomcat.apache.org and install it.


Best regards,
Konstantin Kolinko

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