title: Migrate EJB 2.1 from WebSphere 6.1 to JBoss EAP 6.1
body: <p>I'm trying to migrate from WS 6.1 to JBoss EAP 6.1. I'm having a hard time trying to make the EJB 2.1 working in JBoss 6.1.</p>
  
  <p>(Note : @GatewayEjbJndiName@ is replaced at compile time by ant.)</p>
  
  <p>This was the original ejb-jar.xml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"&gt;
      &lt;display-name&gt;ServerGateway&lt;/display-name&gt;
      &lt;enterprise-beans&gt;
          &lt;session id="Session_gateway"&gt;
              &lt;display-name&gt;GatewayEJBSB&lt;/display-name&gt;
              &lt;ejb-name&gt;@GatewayEjbJndiName@&lt;/ejb-name&gt;
              &lt;home&gt;ca.company.qc.project.server.gateway.ejb.GatewayEJBRemoteHome&lt;/home&gt;
              &lt;remote&gt;ca.company.qc.project.server.gateway.ejb.GatewayEJBRemote&lt;/remote&gt;
              &lt;ejb-class&gt;ca.company.qc.project.server.gateway.ejb.GatewayEJBBean&lt;/ejb-class&gt;
              &lt;session-type&gt;Stateless&lt;/session-type&gt;
              &lt;transaction-type&gt;Container&lt;/transaction-type&gt;
          &lt;/session&gt;
      &lt;/enterprise-beans&gt;
      &lt;assembly-descriptor&gt;
          &lt;container-transaction&gt;
              &lt;method&gt;
                  &lt;ejb-name&gt;@GatewayEjbJndiName@&lt;/ejb-name&gt;
                  &lt;method-name&gt;*&lt;/method-name&gt;
              &lt;/method&gt;
              &lt;trans-attribute&gt;Required&lt;/trans-attribute&gt;
          &lt;/container-transaction&gt;
      &lt;/assembly-descriptor&gt;
  &lt;/ejb-jar&gt;
  </code></pre>
  
  <p>This is (after many hours of research) what i came up for JBoss EAP 6.1 (ejb-jar.xml) :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"&gt;
      &lt;display-name&gt;ServerGateway&lt;/display-name&gt;
      &lt;enterprise-beans&gt;
          &lt;session id="Session_gateway"&gt;
              &lt;display-name&gt;GatewayEJBSB&lt;/display-name&gt;
              &lt;ejb-name&gt;@GatewayEjbJndiName@&lt;/ejb-name&gt;
              &lt;home&gt;ca.company.qc.project.server.gateway.ejb.GatewayEJBRemoteHome&lt;/home&gt;
              &lt;remote&gt;ca.company.qc.project.server.gateway.ejb.GatewayEJBRemote&lt;/remote&gt;
              &lt;ejb-class&gt;ca.company.qc.project.server.gateway.ejb.GatewayEJBBean&lt;/ejb-class&gt;
              &lt;session-type&gt;Stateless&lt;/session-type&gt;
              &lt;transaction-type&gt;Container&lt;/transaction-type&gt;
              &lt;ejb-ref&gt;
                  &lt;ejb-ref-name&gt;ejb/projectGatewayEJB&lt;/ejb-ref-name&gt;
                  &lt;ejb-ref-type&gt;Session&lt;/ejb-ref-type&gt;
                  &lt;home&gt;ca.company.qc.project.server.gateway.ejb.GatewayEJBRemoteHome&lt;/home&gt;
                  &lt;remote&gt;ca.company.qc.project.server.gateway.ejb.GatewayEJBRemote&lt;/remote&gt;
              &lt;/ejb-ref&gt;
          &lt;/session&gt;
      &lt;/enterprise-beans&gt;
      &lt;assembly-descriptor&gt;
          &lt;container-transaction&gt;
              &lt;method&gt;
                  &lt;ejb-name&gt;@GatewayEjbJndiName@&lt;/ejb-name&gt;
                  &lt;method-name&gt;*&lt;/method-name&gt;
              &lt;/method&gt;
              &lt;trans-attribute&gt;Required&lt;/trans-attribute&gt;
          &lt;/container-transaction&gt;
      &lt;/assembly-descriptor&gt;
  &lt;/ejb-jar&gt;
  </code></pre>
  
  <p>But every time is tried to start the JBoss server i have this error : </p>
  
  <pre><code>[org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named ProjectGatewayEJB in deployment unit subdeployment "GatewayEJBClientProject.jar" of deployment "Project.ear" are as follows:
  
      java:global/Project/GatewayEJBClientProject/ProjectGatewayEJB!ca.company.qc.project.server.gateway.ejb.GatewayEJBRemote
      java:app/GatewayEJBClientProject/ProjectGatewayEJB!ca.company.qc.project.server.gateway.ejb.GatewayEJBRemote
      java:module/ProjectGatewayEJB!ca.company.qc.project.server.gateway.ejb.GatewayEJBRemote
      java:jboss/exported/Project/GatewayEJBClientProject/ProjectGatewayEJB!ca.company.qc.project.server.gateway.ejb.GatewayEJBRemote
      java:global/Project/GatewayEJBClientProject/ProjectGatewayEJB!ca.company.qc.project.server.gateway.ejb.GatewayEJBRemoteHome
      java:app/GatewayEJBClientProject/ProjectGatewayEJB!ca.company.qc.project.server.gateway.ejb.GatewayEJBRemoteHome
      java:module/ProjectGatewayEJB!ca.company.qc.project.server.gateway.ejb.GatewayEJBRemoteHome
      java:jboss/exported/Project/GatewayEJBClientProject/ProjectGatewayEJB!ca.company.qc.project.server.gateway.ejb.GatewayEJBRemoteHome
  
  10:54:41,858 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.subunit."Project.ear"."ProjectWebApp.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."Project.ear"."ProjectWebApp.war".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "ProjectWebApp.war" of deployment "Project.ear"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
      at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
  Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014543: No EJB found with interface of type 'ca.company.qc.project.server.gateway.ejb.GatewayEJBRemoteHome' and name 'ServerGateway.jar#GatewayEJB' for binding java:module/env/ProjectGatewayEJBBean
      at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:97)
      at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:229)
      at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:120)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
      ... 5 more
  </code></pre>
  
  <p>There is NO annotation anywhere in the EJBBean/EJBRemote/EJBRemoteBusiness/EJBRemoteHome classes. Because it's not supported in EJB 2.1 (for what i know).</p>
  
  <p>I run the server using the "standalone-full.xml" config file. I also tried standalone-ha.xml with no success.</p>
  
  <p>I really don't know what to do next..</p>