2 Replies Latest reply on Jul 30, 2004 12:18 PM by Dimitris Andreadis

    Problem in installing castorJDO Mbean between jboss 3.2.3 an

    Marco Novice

      hi all,
      i have been developing apps on jboss 3.2.3 for a long time, using CastorJDO Mbean, and never had any problems at all.
      Recently, i moved to jboss 3.2.5, tried to install CastorJDO MBean and got exceptions.
      First of all, let me summarize what i did with both versions:
      - with 3.2.3, i just placed CastorMBean.sar in server\default\deploy directory

      - with 3.2.5 i first did the same as above, and got following exception:
      14:41:46,953 INFO [NamingService] Started jnpPort=1099, rmiPort=1098, backlog=5
      0, bindAddress=/0.0.0.0, Client SocketFactory=null, Server SocketFactory=org.jbo
      ss.net.sockets.DefaultSocketFactory@ad093076
      14:41:49,343 WARN [NestedThrowable] Duplicate throwable nesting of same base ty
      pe: class org.jboss.deployment.DeploymentException is assignable from: class org
      .jboss.deployment.DeploymentException
      14:41:49,343 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.
      2.5/server/default/deploy/castorMBean.sar
      org.jboss.deployment.DeploymentException: create operation failed for package fi
      le:/C:/jboss-3.2.5/server/default/deploy/castorMBean.sar; - nested throwable: (o
      rg.jboss.deployment.DeploymentException: Unexpected error during load of: org.jb
      oss.jdo.castor.CastorJDOImpl, msg=org/exolab/castor/jdo/DataObjects; - nested th
      rowable: (java.lang.ClassNotFoundException: Unexpected error during load of: org
      .jboss.jdo.castor.CastorJDOImpl, msg=org/exolab/castor/jdo/DataObjects))
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:227)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:478)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:274)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:221)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:837)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:592)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      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:536)
      Caused by: org.jboss.deployment.DeploymentException: Unexpected error during loa
      d of: org.jboss.jdo.castor.CastorJDOImpl, msg=org/exolab/castor/jdo/DataObjects;
      - nested throwable: (java.lang.ClassNotFoundException: Unexpected error during
      load of: org.jboss.jdo.castor.CastorJDOImpl, msg=org/exolab/castor/jdo/DataObjec
      ts)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
      :139)
      at org.jboss.system.ServiceController.install(ServiceController.java:198
      )
      at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:204)
      ... 66 more
      Caused by: java.lang.ClassNotFoundException: Unexpected error during load of: or
      g.jboss.jdo.castor.CastorJDOImpl, msg=org/exolab/castor/jdo/DataObjects
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLo
      ader3.java:215)
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader
      3.java:132)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:
      843)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:
      290)
      at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:
      317)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:98)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
      tor.java:149)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
      :114)
      ... 79 more
      14:41:49,546 INFO [RARMetaData] Loading JBoss Resource Adapter for JDBC 2 XA dr


      so, in thinking that it was a Classpath/ClassLoading problem, i placed my castor.jar in the server\default\lib directory.

      After that, when i run jboss, i got a different exception:

      14:43:57,937 WARN [CastorJDOImpl] Unexcepted error accessing MBeanInfo for :ser
      vice=CastorJDO,name=null
      javax.management.InstanceNotFoundException: :service=CastorJDO,name=null is not
      registered.
      at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistr
      y.java:462)
      at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java
      :478)
      at org.jboss.system.ServiceMBeanSupport.postRegister(ServiceMBeanSupport
      .java:418)
      at org.jboss.mx.server.AbstractMBeanInvoker.invokePostRegister(AbstractM
      BeanInvoker.java:769)
      at org.jboss.mx.server.AbstractMBeanInvoker.postRegister(AbstractMBeanIn
      voker.java:571)
      at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMB
      eanRegistry.java:311)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.jav
      a:1018)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.jav
      a:981)
      at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:
      318)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:98)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
      tor.java:149)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
      :114)
      at org.jboss.system.ServiceController.install(ServiceController.java:198
      )
      at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:204)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:478)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:274)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:221)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:837)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:592)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      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)

      Can anyone help me out, pls? it's been 7 days that i m struggling with htis..

      thanx in advance and regards
      Marco

        • 1. Re: Problem in installing castorJDO Mbean between jboss 3.2.
          Marco Novice

          hello,
          i am still stuck with problems in installing CastorJDO MBean on jboss..
          i extended my tests and today i installed same MBean on following versions:
          - 3.2.2
          - 3.2.3
          - 3.2.5
          - 4.0.0dr4

          in all except 3.2.3 i got following exception:

          13:38:51,828 INFO [NamingService] Started jnpPort=1099, rmiPort=1098, backlog=
          0, bindAddress=null, Client SocketFactory=null, Server SocketFactory=null
          13:38:56,656 WARN [CastorJDOImpl] Unexcepted error accessing MBeanInfo for :na
          e=null,service=CastorJDO
          javax.management.InstanceNotFoundException: :name=null,service=CastorJDO is not
          registered.
          at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegist
          y.java:509)
          at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.jav
          :650)
          at org.jboss.system.ServiceMBeanSupport.postRegister(ServiceMBeanSuppor
          .java:419)
          at org.jboss.mx.server.AbstractMBeanInvoker.invokePostRegister(Abstract
          BeanInvoker.java:765)
          at org.jboss.mx.server.AbstractMBeanInvoker.postRegister(AbstractMBeanI
          voker.java:579)
          at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicM
          eanRegistry.java:318)
          at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
          sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatc
          er.java:141)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercep
          or.java:119)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(Model
          BeanOperationInterceptor.java:131)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker
          java:232)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
          at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1395)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.ja
          a:1390)
          at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.ja
          a:1325)
          at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java
          329)
          at org.jboss.system.ServiceCreator.install(ServiceCreator.java:98)
          at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigur
          tor.java:149)
          at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.jav
          :114)
          at org.jboss.system.ServiceController.install(ServiceController.java:20
          )
          at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
          sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatc
          er.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:232)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174)
          at $Proxy4.install(Unknown Source)
          at org.jboss.deployment.SARDeployer.create(SARDeployer.java:207)
          at org.jboss.deployment.MainDeployer.create(MainDeployer.java:817)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:673)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:637)
          at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
          sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatc
          er.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:232)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174)
          at $Proxy7.deploy(Unknown Source)
          at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeployme
          tScanner.java:304)
          at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeployment
          canner.java:478)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread
          doScan(AbstractDeploymentScanner.java:201)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(
          bstractDeploymentScanner.java:274)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBean
          upport.java:271)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceM
          eanSupport.java:221)
          at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
          sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatc
          er.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:232)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
          at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceContro
          ler.java:844)
          at $Proxy0.start(Unknown Source)
          at org.jboss.system.ServiceController.start(ServiceController.java:369)
          at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
          sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatc
          er.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:232)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174)
          at $Proxy4.start(Unknown Source)
          at org.jboss.deployment.SARDeployer.start(SARDeployer.java:260)
          at org.jboss.deployment.MainDeployer.start(MainDeployer.java:863)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:674)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:637)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
          java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
          sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatc
          er.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:232)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174)
          at $Proxy5.deploy(Unknown Source)
          at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:386)
          at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
          at org.jboss.Main.boot(Main.java:150)
          at org.jboss.Main$1.run(Main.java:395)
          at java.lang.Thread.run(Thread.java:536)


          can anyone help me in sorting this issue out?

          with best regards
          marco

          below is code as well as xml deployment descriptor

          ?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE server>





          C:/Sw/Budget-Project/Framework/src/conf/database.xml
          BudgetJDO
          10000
          true
          false
          true
          true



          *************************************
          /*
          * JBoss, the OpenSource EJB server
          *
          * Distributable under LGPL license.
          * See terms of license at gnu.org.
          */

          package org.jboss.jdo.castor;

          import java.io.PrintWriter;
          import java.io.Serializable;
          //import java.lang.reflect.InvocationHandler;
          //import java.lang.reflect.Proxy;
          import java.lang.reflect.Method;
          import java.util.HashMap;
          import java.util.Hashtable;

          import javax.management.*;
          import javax.naming.spi.ObjectFactory;
          import javax.naming.Referenceable;
          import javax.naming.Reference;
          import javax.naming.Context;
          import javax.naming.InitialContext;
          import javax.naming.Name;
          import javax.naming.NamingException;
          import javax.naming.NameNotFoundException;

          import org.xml.sax.EntityResolver;
          import org.xml.sax.InputSource;

          import org.exolab.castor.jdo.Database;
          import org.exolab.castor.jdo.DataObjects;
          import org.exolab.castor.jdo.JDO;
          import org.exolab.castor.jdo.DatabaseNotFoundException;
          import org.exolab.castor.jdo.PersistenceException;
          import org.exolab.castor.persist.spi.LogInterceptor;
          import org.exolab.castor.xml.Unmarshaller;

          import org.jboss.logging.Logger;
          import org.jboss.logging.Log4jLoggerPlugin;
          import org.jboss.logging.util.*;
          import org.jboss.mx.util.*;

          import org.jboss.proxy.compiler.Proxy;
          import org.jboss.proxy.compiler.Proxies;
          import org.jboss.proxy.compiler.InvocationHandler;
          import org.jboss.system.ServiceMBeanSupport;


          /**
          * @jmx.mbean name="CastorJDOImpl"
          * description="Castor JDO MBean"
          *
          * @jboss.service servicefile="jboss"
          * Castor JDO support
          * Modified by Marco Mistroni (marco.mistroni0@lycos.com)
          * in order to be used with JBoss3.2.1 onward.
          * Some classes are in different packages
          * in 3.2.1 onward versions.
          *
          * @author Oleg Nitz (on@ibis.odessa.ua)
          * @version $Revision: 1.13 $
          */
          public class CastorJDOImpl extends ServiceMBeanSupport
          implements DataObjects, ObjectFactory, Referenceable, Serializable,
          CastorJDOImplMBean, MBeanRegistration, LogInterceptor {

          private String _jndiName;

          private String _dbConf;

          private JDO _jdo = new JDO();

          private String _dataSourceName;

          private static HashMap _instances = new HashMap();

          private transient PrintWriter writer;

          /**
          * Do JDO classes should be loader by the global class loader
          * (the same class loader as Castor classes)?
          */
          private boolean _commonClassPath;

          /*
          * True if user prefers application-server database pooling.
          * False (default) if user wants a new connection for each invocation of
          * getDatabase().
          */
          private boolean _dbPooling = false;

          private boolean _autoStore;

          public CastorJDOImpl() {
          }

          public ObjectName getObjectName(MBeanServer server, ObjectName name)
          throws javax.management.MalformedObjectNameException {
          return new ObjectName(OBJECT_NAME+",name="+_jndiName);
          }

          /**
          * @jmx.managed-attribute
          * access="read-only"
          */
          public String getName() {
          return "CastorJDO";
          }

          public void startService() throws Exception {
          org.exolab.castor.jdo.conf.Database database;
          Unmarshaller unm;
          int pos;
          Method m;

          // Bind in JNDI
          bind(new InitialContext(), "java:/" + _jndiName, this);
          log.debug("DataObjects factory for " + _dataSourceName + " bound to " + _jndiName);

          _jdo.setTransactionManager("java:/TransactionManager");
          _jdo.setConfiguration(_dbConf);
          unm = new Unmarshaller(org.exolab.castor.jdo.conf.Database.class);
          database = (org.exolab.castor.jdo.conf.Database) unm.unmarshal(new InputSource(_dbConf));
          _jdo.setDatabaseName(database.getName());
          if (database.getJndi() != null) {
          _dataSourceName = database.getJndi().getName();
          }

          // Older Castor versions older don't have these methods,
          // we'll use reflection for backward compatibility
          //_jdo.setDatabasePooling(_dbpooling);
          try {
          // 0.9.3
          m = _jdo.getClass().getMethod("setDatabasePooling",
          new Class[] {boolean.class});
          m.invoke(_jdo, new Object[] {new Boolean(_dbPooling)});
          } catch (Exception ex) {
          log.debug("couldn't invoke setDatabasePooling()");
          }
          //_jdo.setAutoStore( _autoStore );
          try {
          m = _jdo.getClass().getMethod("setAutoStore",
          new Class[] {boolean.class});
          m.invoke(_jdo, new Object[] {new Boolean(_autoStore)});
          } catch (Exception ex) {
          log.debug("couldn't invoke setAutoStore()");
          }
          _instances.put(_jndiName, this);
          }

          public void stopService() {
          // Unbind from JNDI
          try {
          new InitialContext().unbind(_jndiName);
          } catch (NamingException e) {
          }
          }


          // CastorJDOImplMBean implementation ---------------------------

          public void setJndiName(String jndiName) {
          _jndiName = jndiName;
          }

          /**
          * @jmx.managed-attribute
          * access="read-only"
          * value="BudgetJDO@
          */

          public String getJndiName() {
          return _jndiName;
          }

          public void setConfiguration(String dbConf) {
          _dbConf = dbConf;
          }

          /**
          * @jmx.managed-attribute
          * access="read-write"
          * value="C:/Sw/Budget-Project/Framework/src/conf/database.xml"
          */

          public String getConfiguration() {
          return _dbConf;
          }

          public void setLockTimeout(int lockTimeout) {
          _jdo.setLockTimeout(lockTimeout);
          }

          /**
          * @jmx.managed-attribute
          * access="read-write"
          * value="10000"
          */
          public int getLockTimeout() {
          return _jdo.getLockTimeout();
          }

          public void setLoggingEnabled(boolean loggingEnabled) {
          _jdo.setLogInterceptor(loggingEnabled ? this : null);
          }

          /**
          * @jmx.managed-attribute
          * access="read-write"
          * value="true"
          */

          public boolean getLoggingEnabled() {
          return (_jdo.getLogInterceptor() != null);
          }

          public void setCommonClassPath(boolean commonClassPath) {
          _commonClassPath = commonClassPath;
          }


          public boolean getCommonClassPath() {
          return _commonClassPath;
          }

          /*
          * True if user prefers to use application server database pools.
          * False if user wants a new connection for each call to getDatabase().
          */

          public void setDatabasePooling(boolean dbPooling) {
          _dbPooling = dbPooling;
          }

          /**
          * @jmx.managed-attribute
          * access="read-write"
          * value="true"
          * Return true if the Database instance uses the application server pooling.
          */

          public boolean isDatabasePooling() {
          return _dbPooling;
          }

          public void setAutoStore( boolean autoStore ) {
          _autoStore = autoStore;
          }

          /**
          * @jmx.managed-attribute
          * access="read-write"
          * value="true"
          */

          public boolean getAutoStore() {
          return _autoStore;
          }

          // DataObjects implementation ----------------------------------
          public Database getDatabase()
          throws DatabaseNotFoundException, PersistenceException {
          if (_commonClassPath) {
          _jdo.setClassLoader(null);
          } else {
          _jdo.setClassLoader(Thread.currentThread().getContextClassLoader());
          }
          return _jdo.getDatabase();
          }


          public void setDescription(String description) {
          _jdo.setDescription(description);
          }


          public String getDescription() {
          return _jdo.getDescription();
          }

          // Referenceable implementation ----------------------------------
          public Reference getReference() {
          return new Reference(getClass().getName(), getClass().getName(), null);
          }

          // ObjectFactory implementation ----------------------------------
          public Object getObjectInstance(Object obj,
          Name name,
          Context nameCtx,
          Hashtable environment)
          throws Exception {
          return _instances.get(name.toString());
          }

          // Private -------------------------------------------------------
          private void bind(Context ctx, String name, Object val)
          throws NamingException {
          // Bind val to name in ctx, and make sure that all intermediate contexts exist

          Name n = ctx.getNameParser("").parse(name);
          while (n.size() > 1)
          {
          String ctxName = n.get(0);
          try
          {
          ctx = (Context)ctx.lookup(ctxName);
          } catch (NameNotFoundException e)
          {
          ctx = ctx.createSubcontext(ctxName);
          }
          n = n.getSuffix(1);
          }

          ctx.bind(n.get(0), val);
          }

          // LogInterceptor implementation for Castor 0.8 ----------------------
          public void loading(Class objClass, Object identity) {
          log.debug( "Loading " + objClass.getName() + " (" + identity + ")" );
          }


          public void creating(Class objClass, Object identity) {
          log.debug( "Creating " + objClass.getName() + " (" + identity + ")" );
          }


          public void removing(Class objClass, Object identity) {
          log.debug( "Removing " + objClass.getName() + " (" + identity + ")" );
          }


          public void storing(Class objClass, Object identity) {
          log.debug( "Storing " + objClass.getName() + " (" + identity + ")" );
          }


          // LogInterceptor implementation for Castor 0.9 ----------------------
          public void loading(Object objClass, Object identity) {
          log.debug( "Loading " + objClass + " (" + identity + ")" );
          }


          public void creating(Object objClass, Object identity) {
          log.debug( "Creating " + objClass + " (" + identity + ")" );
          }


          public void removing(Object objClass, Object identity) {
          log.debug( "Removing " + objClass + " (" + identity + ")" );
          }


          public void storing(Object objClass, Object identity) {
          log.debug( "Storing " + objClass + " (" + identity + ")" );
          }


          // LogInterceptor implementation - the rest part --------------------

          public void storeStatement(String statement) {
          log.debug(statement);
          }


          public void queryStatement(String statement) {
          log.debug(statement);
          }


          public void message(String message) {
          log.debug(message);
          }


          public void exception(Exception except) {
          log.error(except);
          }

          public PrintWriter getPrintWriter() {
          if (writer == null) {
          writer = new CategoryWriter(((Log4jLoggerPlugin)log.getLoggerPlugin ()).getCategory ());
          }
          return writer;
          }

          }








          • 2. Re: Problem in installing castorJDO Mbean between jboss 3.2.
            Dimitris Andreadis Master

            Not sure if it'll help, but I think I've seen that before:

            Please check if there is any nested directory, "meta-inf" instead of "META-INF".

            Regards
            /Dimitris