3 Replies Latest reply on Feb 24, 2010 10:43 AM by Guy Coleman

    [6.0.0M2] SessionContext "mapped-name is required"

    Guy Coleman Newbie

      I've got a bean which extends a superclass. That superclass has a SessionContext injected:

       

      @Resource
      private SessionContext sessionContext;
      

      On deployment I get this exception:

              at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:189)
              at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:59)
              at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56)
              at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1660)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1378)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1431)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1319)
              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:898)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:677)
              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
              at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
              at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
              at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:873)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:620)
              at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:259)
              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:100)
              at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:860)
              at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:441)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.Exception: Exception while processing container metadata for EJB: Baccarat in unit: mybean-ejbs.jar
              at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:551)
              at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
              ... 37 more
      Caused by: java.lang.RuntimeException: mapped-name is required for com.virtuefusion.util.ejb.SessionAdapter/sessionContext of deployment MyBean
              at org.jboss.injection.ResourceHandler.loadXmlResourceEnvRefs(ResourceHandler.java:310)
              at org.jboss.injection.ResourceHandler.loadXml(ResourceHandler.java:350)
              at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:598)
              at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:420)
              at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:529)
              ... 38 more
      
      I found a similar bug but it was fixed some time ago.