2 Replies Latest reply on Sep 19, 2008 9:28 AM by jaikiran

    log4Services fails when using CompositeRollingAppender

    aozarov

      when adding to jboss/server/default/lib folder a jar file that contains
      CompositeRollingAppender I get the following exception when JBoss
      starts or each time I try to reconfigure the service:

      Cause: java.lang.IllegalAccessError: tried to access class org.apache.log4j.RollingCalendar from class org.apache.log4j.
      CompositeRollingAppender
      at org.jboss.mx.server.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:99)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:64)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
      at $Proxy0.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:326)
      at org.jboss.system.ServiceController.create(ServiceController.java:271)
      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.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.create(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:213)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:783)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:588)
      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.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
      at org.jboss.Main.boot(Main.java:145)
      at org.jboss.Main$1.run(Main.java:399)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.IllegalAccessError: tried to access class org.apache.log4j.RollingCalendar from class org.apache.lo
      g4j.CompositeRollingAppender
      at org.apache.log4j.CompositeRollingAppender.(CompositeRollingAppender.java:108)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      ...

      RollingCalendar is package protected but CompositeRollingAppender uses the same package.

        • 1. Re: log4Services fails when using CompositeRollingAppender
          aneesh62003

          I'm also facing the same problem. Do any one has any suggestion. Urgent Please..

          • 2. Re: log4Services fails when using CompositeRollingAppender
            jaikiran

            This is a 4 year old thread and you probably wont get any response if you don't explain more about your setup, the application and the exception.

            Which version of JBoss and Java do you use? What exception do you see? Post the entire exception stacktrace and the console logs. When do you see this exception?

            While posting the logs or xml content or code, remember to wrap it in a code block using the Code button in the message editor window and please hit the Preview button to make sure your post is correctly formatted