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

    [6.0.0M2] EJB Implementation Class for EJB XXX was not specified

    Guy Coleman Newbie

      I have an EJB3 bean defined like this:

       

      @Stateless(name = "HorseRacing")
      @Local(Game.class)
      @TransactionAttribute(REQUIRED)
      public class HorseRacingBean implements Game
      {
      ...
      }

       

      And en empty ejb-jar.xml:


      <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
               version="3.0">

      </ejb-jar>

       

      I'm using jboss.xml to assign a local jndi name:

       

      <jboss>
          <security-domain>java:/jaas/server-login</security-domain>
          <enterprise-beans>
              <session>
                  <ejb-name>HorseRacing</ejb-name>
                  <local-jndi-name>ejb/local/HorseRacing</local-jndi-name>
              </session>
          </enterprise-beans>
      </jboss>

       

       


      This results in an exception on startup (NullPointerException with assets turned off, this one with asserts turned on):

       

              at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:185)
              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.AssertionError: EJB Implementation Class for EJB HorseRacing was not specified
              at org.jboss.metadata.process.processor.ejb.jboss.SetDefaultLocalBusinessInterfaceProcessor.process(SetDefaultLocalBusinessInterfaceProcessor.
      java:108)
              at org.jboss.metadata.process.chain.ejb.jboss.JBossMetaDataProcessorChain.process(JBossMetaDataProcessorChain.java:115)
              at org.jboss.ejb3.deployers.Ejb3MetadataProcessingDeployer.deploy(Ejb3MetadataProcessingDeployer.java:142)
              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
              ... 32 more

       

      Adding a <session> with <ejb-class> etc to ejb-jar.xml allows the bean to deploy, but that shouldn't be necessary with EJB3, should it?