logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjay_Pa...@JohnLewis.co.uk
Subject Using SocketAppender in Websphere
Date Tue, 02 Feb 2010 08:43:33 GMT
Hi Guys,

Please can you advise me here. I am trying to use SocketAppender for the 
first time in Websphere. This is how my config file looks like :

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
        <appender name="SocketAppender" class=
"org.apache.log4j.net.SocketAppender">
                <param name="RemoteHost" value="localhost" />
                <param name="Port" value="4445" />
        </appender>
        <root>
                <priority value="WARN" />
                <appender-ref ref="SocketAppender" />
        </root>
</log4j:configuration>

Now when I re-start the server after deploying my application, I get below 
error on the console :

[02/02/10 08:34:41:365 GMT] 0000000f SystemErr     R log4j:ERROR Could not 
connect to remote log4j server at [localhost]. We will try again later.
[02/02/10 08:34:41:365 GMT] 0000000f SystemErr     R 
java.net.ConnectException: Connection refused: connect
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
java.net.PlainSocketImpl.socketConnect(Native Method)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:372)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:233)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:220)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:378)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
java.net.Socket.connect(Socket.java:536)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
java.net.Socket.connect(Socket.java:486)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
java.net.Socket.<init>(Socket.java:394)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
java.net.Socket.<init>(Socket.java:236)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.apache.log4j.net.SocketAppender.connect(SocketAppender.java:203)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.apache.log4j.net.SocketAppender.activateOptions(
SocketAppender.java:160)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.apache.log4j.xml.DOMConfigurator.parseAppender(
DOMConfigurator.java:220)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(
DOMConfigurator.java:150)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(
DOMConfigurator.java:163)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(
DOMConfigurator.java:425)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:394)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:829)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:724)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:553)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.johnlewis.jjs.jjs2logging.common.loggingconfiguration.JJSLoggerInitialiser.<init>(
JJSLoggerInitialiser.java:72)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(
NativeConstructorAccessorImpl.java:67)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
DelegatingConstructorAccessorImpl.java:45)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
java.lang.reflect.Constructor.newInstance(Constructor.java:521)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(
SimpleInstantiationStrategy.java:107)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(
ConstructorResolver.java:275)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(
AbstractAutowireCapableBeanFactory.java:984)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(
AbstractAutowireCapableBeanFactory.java:886)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(
AbstractAutowireCapableBeanFactory.java:479)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(
AbstractAutowireCapableBeanFactory.java:450)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
AbstractBeanFactory.java:290)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(
DefaultSingletonBeanRegistry.java:222)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
AbstractBeanFactory.java:287)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:189)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(
DefaultListableBeanFactory.java:557)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(
AbstractApplicationContext.java:842)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.context.support.AbstractApplicationContext.refresh(
AbstractApplicationContext.java:416)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.web.context.ContextLoader.createWebApplicationContext(
ContextLoader.java:261)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.web.context.ContextLoader.initWebApplicationContext(
ContextLoader.java:192)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
org.springframework.web.context.ContextLoaderListener.contextInitialized(
ContextLoaderListener.java:47)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(
WebApp.java:645)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(
WebApp.java:311)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:290)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(
WebGroup.java:90)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(
VirtualHost.java:157)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:665)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(
WebContainer.java:618)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.webcontainer.component.WebContainerImpl.install(
WebContainerImpl.java:335)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.webcontainer.component.WebContainerImpl.start(
WebContainerImpl.java:551)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(
ApplicationMgrImpl.java:1303)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(
DeployedApplicationImpl.java:1138)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.runtime.component.DeployedModuleImpl.start(
DeployedModuleImpl.java:569)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.runtime.component.ApplicationMgrImpl.startModule(
ApplicationMgrImpl.java:1770)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.runtime.component.ApplicationMgrImpl._startModule(
ApplicationMgrImpl.java:1718)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.runtime.component.ApplicationMgrImpl$ApplicationNotifier.classChanged(
ApplicationMgrImpl.java:1930)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.classloader.ClassLoaderManager.checkAndNotify(
ClassLoaderManager.java:548)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.classloader.ClassLoaderManager.access$000(
ClassLoaderManager.java:71)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.classloader.ClassLoaderManager$ReloadTimerTask.alarm(
ClassLoaderManager.java:584)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ejs.util.am._Alarm.run(_Alarm.java:90)
[02/02/10 08:34:41:459 GMT] 0000000f SystemErr     R    at 
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)

Has anyone used Socket appender before in Websphere 6.1 ?? if yes, please 
can they advise me how to configure the same ?

**********************************************************************
This email is confidential and may contain copyright material of the John Lewis Partnership.

If you are not the intended recipient, please notify us immediately and delete all copies
of this message. 
(Please note that it is your responsibility to scan this message for viruses). Email to and
from the
John Lewis Partnership is automatically monitored for operational and lawful business reasons.
**********************************************************************

John Lewis plc
Registered in England 233462
Registered office 171 Victoria Street London SW1E 5NN
 
Websites: http://www.johnlewis.com 
http://www.waitrose.com 
http://www.greenbee.com
http://www.johnlewispartnership.co.uk
 
**********************************************************************

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message