4 Replies Latest reply on Sep 29, 2004 3:19 PM by Adam Krieg

    log4j.xml & Syslog

    nau10 Newbie

      I've uncommented the syslog section in the log4j.xml file:







      and added it to the section


      <appender-ref ref="CONSOLE"/>
      <appender-ref ref="FILE"/>
      <appender-ref ref="SYSLOG"/>


      However, when I startup the server, it bombs spectacularly.

      16:14:40,049 INFO [Log4jService] Creating
      16:14:40,054 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
      16:14:40,443 WARN [Log4jService$URLWatchTimerTask] Failed to check URL: resource:log4j.xml
      java.lang.NullPointerException
      at org.apache.log4j.net.SyslogAppender.append(SyslogAppender.java:241)
      at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
      at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
      at org.apache.log4j.Category.callAppenders(Category.java:187)
      at org.apache.log4j.Category.forcedLog(Category.java:372)
      at org.apache.log4j.Category.log(Category.java:864)
      at org.jboss.logging.Log4jLoggerPlugin.debug(Log4jLoggerPlugin.java:128)
      at org.jboss.logging.Logger.debug(Logger.java:142)
      at org.jboss.logging.Log4jService.installSystemAdapters(Log4jService.java:400)
      at org.jboss.logging.Log4jService.access$500(Log4jService.java:59)
      at org.jboss.logging.Log4jService$URLWatchTimerTask.reconfigure(Log4jService.java:635)
      at org.jboss.logging.Log4jService$URLWatchTimerTask.run(Log4jService.java:561)
      at org.jboss.logging.Log4jService.setup(Log4jService.java:448)
      at org.jboss.logging.Log4jService.createService(Log4jService.java:464)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy0.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:310)
      at org.jboss.system.ServiceController.create(ServiceController.java:243)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.create(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:192)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:365)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:272)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:388)
      at java.lang.Thread.run(Thread.java:536)
      16:14:40,449 ERROR [Log4jService] Initialization failed

      [yadda, yadda, yadda]

      Without the SYSLOG entries, it works just fine.

      16:12:06,180 INFO [Log4jService] Creating
      16:12:06,184 INFO [Log4jService$URLWatchTimerTask] Configuring
      from URL: resource:log4j.xml
      16:12:06,471 INFO [Log4jService] Created