1 Reply Latest reply on Jul 29, 2007 9:41 PM by Reza Rahman

    Trouble using Embeddable EJB 3.0

    Reza Rahman Newbie

      Hi:

      I am the co-author of EJB 3 in Action. I am trying to port our code examples for the book to the JBoss Embeddable container using Tomcat. While deploying, I am getting the following error:

      ===============================================
      WARN 26-07 22:28:28,046 (BeanSchemaBinding.java:init:233) -You should use the 2.0 version of the Microcontainer xml. xmlns='urn:jboss:bean-deployer:2.0'
      ERROR 26-07 22:28:29,484 (AbstractController.java:incrementState:440) -Error installing to Start: name=UserTransaction state=Create
      java.lang.RuntimeException: Unable to lookup TransactionManager
      at org.jboss.ejb3.tx.TxUtil.getTransactionManager(TxUtil.java:51)
      at org.jboss.ejb3.embedded.UserTransactionImpl.start(UserTransactionImpl.java:62)
      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.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
      at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
      at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:75)
      at org.jboss.kernel.plugins.dependency.LifecycleAction.installAction(LifecycleAction.java:115)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:100)
      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:274)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:177)
      at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:291)
      at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:261)
      at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:117)
      at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:95)
      at org.jboss.ejb3.embedded.ServletBootstrapListener.deployXmlResource(ServletBootstrapListener.java:74)
      at org.jboss.ejb3.embedded.ServletBootstrapListener.contextInitialized(ServletBootstrapListener.java:174)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
      at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
      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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: javax.naming.NameNotFoundException: Name TransactionManager is not bound in this Context
      at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
      at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
      at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at org.jboss.ejb3.tx.TxUtil.getTransactionManager(TxUtil.java:46)
      ... 49 more
      java.lang.IllegalStateException: Incompletely deployed:

      *** DEPLOYMENTS IN ERROR: Name -> Error
      UserTransaction -> java.lang.RuntimeException: Unable to lookup TransactionManager

      *** DEPLOYMENTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
      UserTransactionBinding -> InitialContextProperties{Configured:Installed}, UserTransaction{Configured:**ERROR**}

      at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:241)
      at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:161)
      at org.jboss.ejb3.embedded.ServletBootstrapListener.deployXmlResource(ServletBootstrapListener.java:75)
      at org.jboss.ejb3.embedded.ServletBootstrapListener.contextInitialized(ServletBootstrapListener.java:174)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
      at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
      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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      ERROR 26-07 22:28:29,859 (ServletBootstrapListener.java:contextInitialized:200) -java.lang.RuntimeException: java.lang.IllegalStateException: Incompletely deployed:

      *** DEPLOYMENTS IN ERROR: Name -> Error
      UserTransaction -> java.lang.RuntimeException: Unable to lookup TransactionManager

      *** DEPLOYMENTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
      UserTransactionBinding -> InitialContextProperties{Configured:Installed}, UserTransaction{Configured:**ERROR**}

      Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@135605a

      ===============================================

      It seems the embeddable container is having trouble deploying the embedded-jboss-beans.xml file. Beyond this, I have no idea where to start debugging. Am I using the wrong Tomcat version? The wrong jar?

      Any help would be greatly appreciated.

      Reza