1 Reply Latest reply on Oct 7, 2001 12:56 AM by David M. Karr

    Deploy app using EJBUtils:  ... not found within this applic

    David M. Karr Newbie

      I'm trying to set up my application to use EJBUtils. I was able to build it, deploy it, and create the table. I'm deploying the "ejbutils-client.jar" in my EAR with a "Class-Path" entry in the EAR manifest. I was able to compile my application, but when I deploy it, it's able to create the tables, but then I get the following exception:

      [Container factory] org.jboss.ejb.DeploymentException: Bean UIDHighKeyGenerator not found within this application.
      [Container factory] at org.jboss.ejb.Container.setupEnvironment(Container.java:484)
      [Container factory] at org.jboss.ejb.Container.init(Container.java:360)
      [Container factory] at org.jboss.ejb.EntityContainer.init(EntityContainer.ja

      I think I'm likely doing something wrong in my ejb-jar, but I'm not sure what it is.

      The "ejb-jar.xml" for my application has "<ejb-ref>" elements for this bean inside each "" element that is using the generator to get its PK.

      Following this is one "" element.

      ---------------

      User of system
      <ejb-name>UserBean</ejb-name>
      com.intsoft.sgs.ejb.UserHome
      com.intsoft.sgs.ejb.UserRemote
      <ejb-class>com.intsoft.sgs.ejb.UserBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-field><field-name>oid</field-name></cmp-field>
      <cmp-field><field-name>userID</field-name></cmp-field>
      <cmp-field><field-name>password</field-name></cmp-field>
      <cmp-field><field-name>lastName</field-name></cmp-field>
      <cmp-field><field-name>firstNameAndInitials</field-name></cmp-field>
      <primkey-field>oid</primkey-field>
      <ejb-ref>
      <ejb-ref-name>ejb/UIDHighKeyGenerator</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      org.ejbutils.uid.UIDHighKeyGeneratorHome
      org.ejbutils.uid.UIDHighKeyGenerator
      <ejb-link>UIDHighKeyGenerator</ejb-link>
      </ejb-ref>

      ---------------

        • 1. Re: Deploy app using EJBUtils:  ... not found within this ap
          David M. Karr Newbie

          Well, I may have made progress, but I'm not sure. I tried removing the "<ejb-ref>" elements referring to the UIDHighKeyGenerator. That allowed the deployment to complete apparently successfully.

          However, when I actually tried to use it, I got the exception that follows this. I checked the "ejb-jar.xml" for the "ejbutils-deploy.jar" and that specifies "RequiresNew" for all the methods of that bean.

          Just for fun, I tried adding a transaction specification for this bean in my own application, but that brought me back to my original error of "... not found in this application".

          I would ask about this on the "ejbutils-user" list, but there seems to be no activity on that list.

          ---------------------
          [UIDHighKeyGenerator] Application error: BMT stateless bean UIDHighKeyGenerator
          should complete transactions before returning (ejb1.1 spec, 11.6.1)
          [UserBean] CONTAINER EXCEPTION:No transaction.
          [UserBean] java.lang.IllegalStateException: No transaction.
          [UserBean] at org.jboss.tm.TransactionImpl.setRollbackOnly(TransactionImpl.
          java:146)
          [UserBean] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
          InterceptorCMT.java:314)
          [UserBean] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxIntercept
          orCMT.java:86)
          [UserBean] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(Security
          Interceptor.java:103)
          ---------------------