You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Yannick Menager <ym...@yahoo.co.uk> on 2001/06/21 20:02:09 UTC
Re[2]: SocketNode - Unexpected Exception
Hello Paul,
yup.. that's it exactly... that's the reason (or one of the reasons i
guess maybe) finalize is deprecated.... so don't use it... if you're
using 1.3, add a shutdown hook to do that cleanup (can't remember if
that was available under 1.2)
--
Best regards,
Yannick mailto:ymenager@yahoo.co.uk
Thursday, June 21, 2001, 6:53:46 PM, you wrote:
PG> Hi Jay,
PG> You're on the right track. What may be happening is that your application
PG> ends without invoking finalize on your objects. This is typical for JVMs.
PG> Upon a call (implicit or explicit) to exit, why bother with garbage
PG> collection when the whole process is about to be cleaned up anyway. For
PG> this reason, the shutdown methods you refer to are not being invoked.
PG> As for the exception itself, I'm not sure if it only results from an abrupt
PG> termination of the socket or even from a graceful closing of the socket
PG> from the client side. Since my experience with using them has been mostly
PG> with app servers that are supposed to run indefinitely, I haven't had an
PG> occasion to gracefully shut them down.
PG> - Paul
PG> Paul Glezen
PG> IT Specialist
PG> Software Services
PG> 818 539 3321
PG> Jay.Macarty@fritolay.com on 06/21/2001 09:30:53 AM
PG> Please respond to "LOG4J Developers Mailing List"
PG> <lo...@jakarta.apache.org>
PG> To: log4j-dev@jakarta.apache.org
PG> cc:
PG> Subject: SocketNode - Unexpected Exception
PG> I am somewhat new to log4j but am looking forward to gaining experience
PG> with it
PG> and possibly contributing to the product itself. Being a totally blind
PG> programmer, many interactive debugging tools are not productively useful to
PG> me
PG> through my speech/Braille output software. However, log4j seems to give me
PG> a
PG> controllable output which is very easy to read and understand.
PG> I have setup a script on an AIX machine to run the SimpleSocketServer class
PG> and
PG> configured my client application (running on Windows NT) to send log
PG> records to
PG> that server. The log records are coming through to the server just fine and
PG> everything looks good until the client application ends. Then I get the
PG> error
PG> message below on the output of the log server.
PG> [2001-06-21 11:12:21] net.SocketNode() - Unexpected exception. Closing
PG> conneciton.
PG> java.io.IOException: A connection with a remote socket was reset by that
PG> socket.
PG> at java.net.SocketInputStream.read(Compiled Code)
PG> at java.net.SocketInputStream.read(Compiled Code)
PG> at java.io.ObjectInputStream.peekCode(Compiled Code)
PG> at java.io.ObjectInputStream.refill(Compiled Code)
PG> at java.io.ObjectInputStream.readObject(Compiled Code)
PG> at java.io.ObjectInputStream.readObject(Compiled Code)
PG> at org.apache.log4j.net.SocketNode.run(Compiled Code)
PG> at java.lang.Thread.run(Compiled Code)
PG> I have tried putting a finalize method in my application with a .shutdown()
PG> call
PG> to the two category names being used.
PG> Any feedback would be appreciated.
PG> ---------------------------------------------------------------------
PG> To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
PG> For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
PG> ---------------------------------------------------------------------
PG> To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
PG> For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org