Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9AAA8D3BA for ; Wed, 31 Oct 2012 19:34:11 +0000 (UTC) Received: (qmail 23715 invoked by uid 500); 31 Oct 2012 19:34:11 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 23662 invoked by uid 500); 31 Oct 2012 19:34:11 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 23652 invoked by uid 99); 31 Oct 2012 19:34:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2012 19:34:11 +0000 Date: Wed, 31 Oct 2012 19:34:11 +0000 (UTC) From: "Ralph Goers (JIRA)" To: log4j-dev@logging.apache.org Message-ID: <1361934707.52572.1351712051425.JavaMail.jiratomcat@arcas> In-Reply-To: <1953296194.27053.1349973903154.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (LOG4J2-96) Error with SocketServer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4J2-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488138#comment-13488138 ] Ralph Goers commented on LOG4J2-96: ----------------------------------- I don't think I understand, or maybe I misunderstood before. Do you have multiple plugins each with their own Log4j jars? The default LoggerContext is the ClassLoaderContextSelector. With that you will get a new configuration - and hence a new Appender - with each ClassLoader. But if the Log4j jars are somewhere that they are being shared you will only have a single AppenderManager that is shared by both Appenders. So it is important for me to know how you are using Log4j before I can give you an answer. > Error with SocketServer > ----------------------- > > Key: LOG4J2-96 > URL: https://issues.apache.org/jira/browse/LOG4J2-96 > Project: Log4j 2 > Issue Type: Bug > Components: Appenders > Affects Versions: 2.0-beta1 > Reporter: Robert Breunung > Assignee: Ralph Goers > Labels: appender, layout, server, socket > > Hello, > by using your core.appender.SocketAppender and your core.netSocketServer I found a dissent. > I am using the default setup of the appender with the SerializedLayout. The first send event to the server is properly deserialized. on the second I get an IOException: > log4j java.io.StreamCorruptedException: invalid type code: AC > I researched the problem and I found a solution here: > http://stackoverflow.com/questions/2393179/streamcorruptedexception-invalid-type-code-ac > The appender creates a new output stream for each log event. It writes every time a header. The listening server don't expect a header the second time. Because of this it crashes. > Sincerely > Robert Breunung -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org