2 Replies Latest reply on Jul 7, 2004 2:40 PM by Geoff Seel

    Application failing after 3.0.4 to 3.2.5 upgrade

    Geoff Seel Newbie

      I have an app running happily under 3.0.4.

      Having now made that production, I have set up a new environment on a second machine and in the process upgraded to 3.2.5

      I have got to the point where the updated ant project appears to work correctly and loads a file (afcw.jar) into the deploy directory of the server. However when attempting to run it I get the following (excerpt from log):

      Bean : uk.co.FOTO.afcw.EJB.AFCWSession
      Section: 7.10.3
      Warning: A Session bean must define at least one ejbCreate method.

      17:55:51,738 ERROR [MainDeployer] could not create deployment: file:/E:/jboss-3.2.5/server/default/deploy/afcw.jar
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:517)

      There is no meaningful error message anywhere (the warning comes from having inheritance in the EJBs and is not a problem on 3.0.4)

      Would be grateful for any suggestions as to what I might have done wrong.

        • 1. Re: Application failing after 3.0.4 to 3.2.5 upgrade
          Kabir Khan Master

          Your session bean class must contain the following method:

          public void ejbCreate() throws CreateException{
          }

          Copied and pasted from the ejb spec section 7.10.3

          7.10.3 ejbCreate methods
          The session bean class must define one or more ejbCreate(...) methods whose signatures
          must follow these rules:
          • The method name must have ejbCreate as its prefix.
          • The method must be declared as public.
          • The method must not be declared as final or static.
          • The return type must be void.
          • The method arguments must be legal types for RMI/IIOP if there is a create<
          METHOD>(...) corresponding to the ejbCreate(...) method on the
          session beanÂ’s remote home interface.
          • The throws clause may define arbitrary application exceptions, possibly including the
          javax.ejb.CreateException.
          Compatibility Note: EJB 1.0 allowed the ejbCreate method to throw the java.rmi.RemoteException
          to indicate a non-application exception. This practice was deprecated in EJB 1.1—an EJB 1.1 or
          EJB 2.0 compliant enterprise bean should throw the javax.ejb.EJBException or another RuntimeException
          to indicate non-application exceptions to the Container (see Section 18.2.2). An EJB 2.0 compliant
          enterprise bean should not throw the java.rmi.RemoteException from the ejbCreate method .

          • 2. Re: Application failing after 3.0.4 to 3.2.5 upgrade
            Geoff Seel Newbie

            Thanks

            So in 3.2.5 it isn't a warning although it says it is!

            Seems to be solved by making the superclass (AFCWSessionBean) abstract.