2 Replies Latest reply on Aug 29, 2007 10:31 AM by Johan Eklund

    Is it possible to deploy EJB2 style entity beans in a EJB 3.

    Johan Eklund Newbie

      Hi everybody,

      I'm about to try a phased migration from EJB2 to EJB3. When I changed version to <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/j2ee"> in ejb-jar.xml, JBoss lists every session bean as EJB3-service, but none of the old entity beans show up in the debug log.

      However I get a lot of
      "2007-08-28 09:00:30,558 WARN [org.jboss.injection.EJBHandler] IGNORING DEPENDENCY: unable to find <ejb-local-ref> of interface org.ejbca.core.ejb.ra.UserDataLocal and ejbLink of UserData in ejb-jar.xml of UserAdminSession it might not be deployed yet" warnings for the entity beans.

      and later I get
      "2007-08-28 09:00:31,271 DEBUG [org.jboss.ejb3.stateless.StatelessDelegateWrapper] Starting failed jboss.j2ee:ear=ejbca.ear,jar=ejbca-ejb.jar,name=TableProtectSession,service=EJB3
      java.lang.RuntimeException: Failed to populate ENC: env/ejb/TableProtectDataLocal global jndi name was null"

      I also noticed some
      "2007-08-28 09:00:17,579 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] Unable to retrieve orbjavax.management.InstanceNotFoundException: jboss:service=CorbaORB is not registered." but I'm not sure this is related..

      Isn't it possible to start the migration by simple running the old code in it's new environment? I'm using JBoss 4.2.1.GA and Sun's Java 1.5.0_12 on Ubuntu x64.

      Any help would be greatly appreciated,
      Johan

        • 2. Re: Is it possible to deploy EJB2 style entity beans in a EJ
          Johan Eklund Newbie

          So.. I've split the project into two jar files project-ejb.jar and project-ejb-entities.jar that are deployed within an .ear.

          The EJB version of project-ejb-entities.jar is 2.1. If the EJB version of project-ejb.jar is 2.1 too, everything works fine as before, but if I set the version of project-ejb.jar to 3.0 things start to go wrong..

          using project-ejb-entities#bean-name in <ejb-link> elements I get the following

          2007-08-29 15:07:48,261 WARN [org.jboss.ejb3.enc.DeploymentEjbResolver] can't find a deployment for path 'project-ejb-entities.jar' of ejb link 'project-ejb-entities.jar#TableProtectData'
          2007-08-29 15:07:48,261 WARN [org.jboss.injection.EJBHandler] IGNORING DEPENDENCY: unable to find <ejb-local-ref> of interface org.ejbca.core.ejb.protect.TableProtectDataLocal and ejbLink of project-ejb-entities.jar#TableProtectData in ejb-jar.xml of TableProtectSession it might not be deployed yet

          and without specifying the jar

          2007-08-29 15:07:48,261 WARN [org.jboss.injection.EJBHandler] IGNORING DEPENDENCY: unable to find <ejb-local-ref> of interface org.ejbca.core.ejb.protect.TableProtectDataLocal and ejbLink of TableProtectData in ejb-jar.xml of TableProtectSession it might not be deployed yet

          Using the same environment as before. Any help is greatly appreciated.
          /Johan