6 Replies Latest reply on Sep 26, 2005 9:16 AM by mcevikce

    MBean deployment problem!!!!

      I have been getting "No ClassLoaders found for: classname" exception when I start my server. Following is my Mbean configuration in jboss-service.xml


      CacheManager


      Can anyone please tell me what is wrong with this Mbean description.

      Thank you

        • 1. Re: MBean deployment problem!!!!
          darranl

          Wrap your XML with [ code ][ /code ] tags without the spaces and use the preview button to make sure your post displays correctly.

          Also execute the command 'jar -tf sarname.sar' against your sar and post the output here.

          • 2. Re: MBean deployment problem!!!!

            I have been getting "No ClassLoaders found for: classname" exception when I start my server. Following is my Mbean configuration in jboss-service.xml

            I think the problem is that I dont know under which domain I should deploy this under.

            Can anyone please tell me what is wrong with this Mbean description.

            Thank you

            </mbean>
             <mbean code="com.bfm.app.viewserver.util.cache.VSCacheManager" name="viewserver:type=VSCacheManager


            here is the partial out of the jar -tf command

            WEB-INF/classes/com/bfm/app/viewserver/util/cache/VSCacheManager.class
            WEB-INF/classes/com/bfm/app/viewserver/util/cache/VSCacheManagerMbean.class




            • 3. Re: MBean deployment problem!!!!
              mazz

              This may sound stupid but... doesn't that interface have to end with "MBean" and not "Mbean".

              Writing a standard MBean has some fairly strict requirements, one being the name of the interface must be the same fully qualified name with "MBean" appended to it. That lowercase "b" might be screwing it up. I don't think JMX allows for case-insentivity here.

              • 4. Re: MBean deployment problem!!!!
                darranl

                Yes correct the case of Mbean to MBean.

                Are you trying to deploy your MBean in a sar or a war?

                It should be in a sar and you need to remove the 'WEB-INF/classes' from the path.

                • 5. Re: MBean deployment problem!!!!

                  I am deploying it as sar. mycustombean.sar conatins META-INF/jboss-service.xml (contains the MBean description) and the MBean. I followed the excample from : http://wiki.jboss.org/wiki/Wiki.jsp?page=ExampleHelloWorldService

                  P.S. I did correct the Mbean to MBean. So the acception I get now is :

                  org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.reflect.UndeclaredThrowable
                  Exception)
                  at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:143)
                  at org.jboss.system.ServiceController.install(ServiceController.java:202)
                  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:585)
                  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:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy4.install(Unknown Source)
                  at org.jboss.deployment.SARDeployer.create(SARDeployer.java:220)
                  at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
                  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:585)
                  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:121)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
                  ptor.java:127)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy8.deploy(Unknown Source)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeplo
                  ymentScanner.java:204)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentSca
                  nner.java:277)
                  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
                  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)

                  at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  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:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
                  at $Proxy0.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:418)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  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:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy4.start(Unknown Source)
                  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
                  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:585)
                  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:121)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
                  ptor.java:127)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy5.deploy(Unknown Source)
                  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
                  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
                  at org.jboss.Main.boot(Main.java:195)
                  at org.jboss.Main$1.run(Main.java:463)
                  at java.lang.Thread.run(Thread.java:595)
                  Caused by: java.lang.reflect.UndeclaredThrowableException
                  at org.jboss.system.ServiceCreator.install(ServiceCreator.java:203)
                  at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:153)
                  at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
                  ... 81 more
                  Caused by: java.lang.NoClassDefFoundError: com/bfm/app/viewserver/cache/VSCacheService
                  at java.lang.Class.getDeclaredConstructors0(Native Method)
                  at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
                  at java.lang.Class.getConstructor0(Class.java:2640)
                  at java.lang.Class.getConstructor(Class.java:1629)
                  at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1217)
                  at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:271)
                  at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:329)
                  at org.jboss.system.ServiceCreator.install(ServiceCreator.java:124)
                  ... 83 more

                  • 6. Re: MBean deployment problem!!!!

                    I solved the problem by including some classes as part of the sar deployment. But these classes are actually part of my web application that is deployed as a war file. Is there any way I can either deploy my MBean as part of this war file rather than seperate sar OR to include classes from my web application's WAR file in the class path of my MBean sar deployment.