2 Replies Latest reply on Feb 13, 2009 9:29 AM by Vijay Gangoni

    Mixed EJB2.1 / EJB3 SessionBeans in same ear fail deployment

    Hakan Dahl Newbie

      I'm trying to deploy an ear-file with mixed content of EJB2.1 and EJB3 SessionBeans onto JBoss 4.0.4 with the ejb3-option.

      Deploy fails for the EJB2.1-bean with essentially:

      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: java.lang.RuntimeException: @javax.ejb.PostActivate annotated method has the wrong signature - public void legacy.LegacyEjbHelloBean.ejbActivate() throws javax.ejb.EJBException,java.rmi.RemoteException
      at org.jboss.ejb3.interceptor.InterceptorInfoRepository$ContainerInitialiser.resolveLifecycleMethod(InterceptorInfoRepository.java:753)

      It actually started to fail for the PreDestroy annotation and the ejbRemove()-method but after adding this to the bean class:

      public void dummy() {}

      it moved on to PostActivate - where it stays even after removing the dummy()-method and annotation, re-deploying and re-starting the server - indicating that something might not be cleaned up properly between deployments.

      A similar problem seems to be described here:


      is it the same?

      Shouldn't mixed EJB2.1 and EJB3 work?
      If bug: when can we expect it to work properly?

      The case: I'm looking into migrating an EJB2.1-app to EJB3 but would like to do it incrementally instead of a big-bang approach.