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 "Ralph Goers (JIRA)" <ji...@apache.org> on 2013/03/25 01:59:15 UTC

[jira] [Resolved] (LOG4J2-177) ERROR StatusLogger An exception occurred processing Appender udpsocket java.lang.NullPointerException

     [ https://issues.apache.org/jira/browse/LOG4J2-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralph Goers resolved LOG4J2-177.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0-beta5
         Assignee: Ralph Goers

Thanks Remko! This issue was fixed in revision 1460497. Please verify and close.
                
> ERROR StatusLogger An exception occurred processing Appender udpsocket java.lang.NullPointerException
> -----------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-177
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-177
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0-beta4
>            Reporter: Aaron Daniels
>            Assignee: Ralph Goers
>             Fix For: 2.0-beta5
>
>
> This seems to be a race condition of some kind. Two threads are exiting at almost exactly the same time, and both print a message as they exit. This exception happens every 3 or 4 times the code is run, so it's easily reproducible.
> ERROR StatusLogger An exception occurred processing Appender udpsocket java.lang.NullPointerException
> 	at org.apache.logging.log4j.core.net.DatagramOutputStream.flush(DatagramOutputStream.java:93)
> 	at org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:146)
> 	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:117)
> 	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:102)
> 	at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:335)
> 	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:316)
> 	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:281)
> 	at org.apache.logging.log4j.core.Logger.log(Logger.java:108)
> 	at org.apache.logging.log4j.spi.AbstractLogger.trace(AbstractLogger.java:250)
> 	at com.galmont.automation.framework.gui.handlers.RunCycleHandler$2.run(RunCycleHandler.java:128)
> 	at java.lang.Thread.run(Unknown Source)
> My configuration file:
> <?xml version="1.0" encoding="UTF-8"?>
> <configuration status="OFF">
> 	
> 	<appenders>
> 		<Console name="console" target="SYSTEM_OUT">
> 			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
> 		</Console>
> 		<Socket name="udpsocket" host="localhost" port="90" protocol="UDP">
> 			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
> 		</Socket>
> 		<RollingFile name="RollingFile" fileName="logs/app.log" filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
> 			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
> 			<Policies>
> 				<SizeBasedTriggeringPolicy size="20 MB" />
> 			</Policies>
> 		</RollingFile>
> 	</appenders>
> 	
> 	<loggers>
> 		<root level="trace">
> 			<appender-ref ref="console" />
> 			<appender-ref ref="udpsocket" />
> 			<appender-ref ref="RollingFile" />
> 		</root>
> 	</loggers>
> 	
> </configuration>

--
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