0 Replies Latest reply on Oct 30, 2003 1:20 PM by brianko

    IllegalAccessError on JMX

    brianko Newbie

      I have this error when I tried to access MBean from my application using RMI adapter provided by Sun (jdmk 5.0).

      I created a start up class that register my timer Mbean and listener. It is reading my db and start all configured schedules. Also it registers the RMIAdapter to enable JMX management from my application.

      What the listener does is to send a JMS message to predefined queue when it gets the notification from timer MBean. The subscribing MDB that does the job will be fired whenever it receive a message.

      My plan work fine except that I got IllegalAccessError when I tried to manipulate the Mbean from my application. My plan was to update the DB and restart the MBean whenever the mbean configuration was changed through UI. It worked fine with Weblogic 7.0 but I am having a problem with Jboss 3.0.7.

      I guess my problem is I need to access a class (com.sun.jdmk.comm.RmiConnectorServer) from C:\jboss-3.0.7_jakarta-tomcat-4.1.24\server\default\lib\jdmkrt.jar when I start JBOSS and I need to access the same class from my application (Another copy of jdmkrt.jar is in my application's ear file.) Is there any solution or work around? Any help will be really appreciated.

      The message is as follows

      14:26:51,386 ERROR [LogInterceptor] Unexpected Error:
      java.lang.IllegalAccessError: tried to access method com.sun.jdmk.comm.RmiConnectorServer.serviceNameForVersion(Ljava/lang/String;I)Ljava/lang/String; from class com.sun.jdmk.comm.RmiConnectorClient
      at com.sun.jdmk.comm.RmiConnectorClient.connect(RmiConnectorClient.java:765)
      at com.kirus.business.kirussys.event.scheduler.EventSchedulerBlSessionBean.manageMBean(EventSchedulerBlSessionBean.java:286)
      at com.kirus.business.kirussys.event.scheduler.EventSchedulerBlSessionBean.editEventScheduler(EventSchedulerBlSessionBean.java:149)
      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.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:738)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy122.editEventScheduler(Unknown Source)
      at com.kirus.business.kirussys.event.scheduler.EventSchedulerCommandProcessor.editEventScheduler(EventSchedulerCommandProcessor.java:139)
      at com.kirus.presentation.kirussys.event.scheduler.ManageEventSchedulerHttpCommand.editScheduler(ManageEventSchedulerHttpCommand.java:215)
      at com.kirus.presentation.kirussys.event.scheduler.ManageEventSchedulerHttpCommand.execute(ManageEventSchedulerHttpCommand.java:127)
      at com.kirus.system.controller.HttpCommandDispatcher.executeCommand(HttpCommandDispatcher.java:155)
      at com.kirus.system.controller.ServletController.doPost(ServletController.java:130)
      at com.kirus.system.controller.ServletController.doGet(ServletController.java:118)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      at java.lang.Thread.run(Thread.java:536)