IllegalAccessError when stopping MBean
femto Nov 10, 2004 5:54 AMHello,
I have a strange behaviour that i don't understand.
I have a MBean named PGC used as a startup MBean. It initializes a database connections pool.
The PGC is in a pgc.jar file, in package tcpro.server.ejb.pgc.PGC.
The pool is in a common.jar file, in package tcpro.server.serveruti.pool.
The start() method of the MBean call the ini() method of the connections pool (that is in another package, in another jar file). This works fine.
Ths stop() method of the MBean call the stop() method of the connections pool. And this doesn't work !
I have the following IllegalAccessError :
11:24:41,400 WARN [ServiceController] Problem stopping service jboss:service=PGC
java.lang.IllegalAccessError: tried to access method tcpro.server.serveruti.pool.SRUC_PoolConnexions.arreterToutesLesConnexions()V from class tcpro.server.ejb.pgc.PGC
at tcpro.server.ejb.pgc.PGC.stopPGC(PGC.java:226)
at tcpro.server.ejb.pgc.PGC.stop(PGC.java:332)
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.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:908)
at $Proxy0.stop(Unknown Source)
at org.jboss.system.ServiceController.stop(ServiceController.java:498)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.stop(Unknown Source)
at org.jboss.deployment.SARDeployer.stop(SARDeployer.java:295)
at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:593)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:576)
at org.jboss.deployment.MainDeployer.shutdown(MainDeployer.java:463)
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.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.system.server.ServerImpl$ShutdownHook.shutdownDeployments(ServerImpl.java:886)
at org.jboss.system.server.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:861)
at org.jboss.system.server.ServerImpl$ShutdownHook.run(ServerImpl.java:849)
What is the problem here ? There is no problem of protected class/method. It works when starting up but doesn't when stopping....
Help me please !
Thank you