1 Reply Latest reply on Sep 14, 2004 8:32 AM by Aitor Illarramendi

    JBoss RMI/IIOP and Hibernate DAO inside a Stateless Session

    Aitor Illarramendi Newbie

      Hello everybody:

      We are experimenting a problem due to the use of Hibernate DAO pattern objects inside a Stateless Session Bean that whe want to have available through RMI/IIOP invocation.

      We have defined a simple Stateless Session Bean which will provide of some database access services through the commented DAO objects. This session bean has been tested without RMI/IIOP invocation options and there has been no problem.

      We have changed now to this new option updating jboss.xml file for this ejb.

      When we tried to launch again JBoss we found that the bean couldn't be initialized.

      It looks like, in the creation of the remote Jboss/IIOP proxy, some references (or value types of these references) related to the Hibernate objects cannot be mapped for the remote IDL, stubs, etc. Specifically the net.sf.hibernate.exception.Nestable abstract interface looks like not interface-able :)

      (See the exception thrown by Jboss at the last part of the post)

      I don't know if this is the best forum for this post or if it will be better to post it at the persistence and related issues forum.

      Do you have any hint related to this problem?

      Are we overlooking something about hibernate configuration? I don't remember any kind of reference about hibernate and remote invocations thorugh RMI/IIOP.

      Has anyone tried to do something similar?

      Many thanks in advance.

      Regards.

      THE EXCEPTION THROWN.

      18:47:35,095 ERROR [StatelessSessionContainer] Initialization failed jboss.j2ee:jndiName=j

      ndiUnidades,service=EJB

      org.jboss.iiop.rmi.ir.IRConstructionException: ValueDef "RMI:net.sf.hibernate.exception.Ne

      stableException:4FF901D2488FBA42:C081E8650C73707F" unable to resolve reference to abstract

      base valuetype "RMI:net.sf.hibernate.exception.Nestable:0000000000000000".

      at org.jboss.iiop.rmi.ir.ValueDefImpl.allDone(ValueDefImpl.java:193)

      at org.jboss.iiop.rmi.ir.ContainerImplDelegate.allDone(ContainerImplDelegate.java:

      342)

      at org.jboss.iiop.rmi.ir.ModuleDefImpl.allDone(ModuleDefImpl.java:216)

      at org.jboss.iiop.rmi.ir.ContainerImplDelegate.allDone(ContainerImplDelegate.java:

      342)

      at org.jboss.iiop.rmi.ir.ModuleDefImpl.allDone(ModuleDefImpl.java:216)

      at org.jboss.iiop.rmi.ir.ContainerImplDelegate.allDone(ContainerImplDelegate.java:

      342)

      at org.jboss.iiop.rmi.ir.ModuleDefImpl.allDone(ModuleDefImpl.java:216)

      at org.jboss.iiop.rmi.ir.ContainerImplDelegate.allDone(ContainerImplDelegate.java:

      342)

      at org.jboss.iiop.rmi.ir.ModuleDefImpl.allDone(ModuleDefImpl.java:216)

      at org.jboss.iiop.rmi.ir.ContainerImplDelegate.allDone(ContainerImplDelegate.java:

      342)

      at org.jboss.iiop.rmi.ir.ContainerImpl.allDone(ContainerImpl.java:95)

      at org.jboss.iiop.rmi.ir.RepositoryImpl.allDone(RepositoryImpl.java:93)

      at org.jboss.iiop.rmi.ir.InterfaceRepository.finishBuild(InterfaceRepository.java:

      148)

      at org.jboss.proxy.ejb.IORFactory.create(IORFactory.java:253)

      at org.jboss.ejb.StatelessSessionContainer.createService(StatelessSessionContainer

      .java:168)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.ja

      va:237)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport

      .java:219)

      at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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(ServiceController.java:8

      37)

      at $Proxy17.create(Unknown Source)

      at org.jboss.system.ServiceController.create(ServiceController.java:283)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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 $Proxy54.create(Unknown Source)

      at org.jboss.ejb.EjbModule.createService(EjbModule.java:337)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.ja

      va:237)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport

      .java:219)

      at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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(ServiceController.java:8

      37)

      at $Proxy17.create(Unknown Source)

      at org.jboss.system.ServiceController.create(ServiceController.java:283)

      at org.jboss.system.ServiceController.create(ServiceController.java:216)

      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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 $Proxy14.create(Unknown Source)

      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:549)

      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)

      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:782)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)

      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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(URLDeploymentScanner.j

      ava:304)

      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.jav

      a:478)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(Abs

      tractDeploymentScanner.java:201)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDep

      loymentScanner.java:274)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.jav

      a:271)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport

      .java:221)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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(ServiceController.java:8

      37)

      at $Proxy0.start(Unknown Source)

      at org.jboss.system.ServiceController.start(ServiceController.java:367)

      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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(DelegatingMethodAccessorImpl.ja

      va: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:534)

      18:47:35,251 WARN [ServiceController] Problem creating service jboss.j2ee:jndiName=jndiUn

      idades,service=EJB

      MBeanException: org.jboss.iiop.rmi.ir.IRConstructionException: ValueDef "RMI:net.sf.hibern

      ate.exception.NestableException:4FF901D2488FBA42:C081E8650C73707F" unable to resolve refer

      ence to abstract base valuetype "RMI:net.sf.hibernate.exception.Nestable:0000000000000000"

      .

      Cause: org.jboss.iiop.rmi.ir.IRConstructionException: ValueDef "RMI:net.sf.hibernate.excep

      tion.NestableException:4FF901D2488FBA42:C081E8650C73707F" unable to resolve reference to a

      bstract base valuetype "RMI:net.sf.hibernate.exception.Nestable:0000000000000000".

      at org.jboss.mx.server.ReflectedDispatcher.handleInvocationExceptions(ReflectedDis

      patcher.java:91)

      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:64)

      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(ServiceController.java:8

      37)

      at $Proxy17.create(Unknown Source)

      at org.jboss.system.ServiceController.create(ServiceController.java:283)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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 $Proxy54.create(Unknown Source)

      at org.jboss.ejb.EjbModule.createService(EjbModule.java:337)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.ja

      va:237)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport

      .java:219)

      at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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(ServiceController.java:8

      37)

      at $Proxy17.create(Unknown Source)

      at org.jboss.system.ServiceController.create(ServiceController.java:283)

      at org.jboss.system.ServiceController.create(ServiceController.java:216)

      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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 $Proxy14.create(Unknown Source)

      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:549)

      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)

      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:782)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)

      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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(URLDeploymentScanner.j

      ava:304)

      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.jav

      a:478)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(Abs

      tractDeploymentScanner.java:201)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDep

      loymentScanner.java:274)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.jav

      a:271)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport

      .java:221)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

      va: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)