2 Replies Latest reply on Jun 7, 2003 6:23 AM by May Huang

    local interface, jboss 3.2.1

    May Huang Newbie

      I have an entity bean (BMP) which I want to expose only the local interface.

      My ejb-jar.xml segment looks like this:

      <ejb-name>Enum</ejb-name>
      <local-home>net.ahmay.common.enum.EnumLocalHome</local-home>
      net.ahmay.common.enum.EnumLocal
      <ejb-class>net.ahmay.common.enum.EnumBean</ejb-class>
      <persistence-type>Bean</persistence-type>
      <prim-key-class>net.ahmay.common.enum.EnumPK</prim-key-class>
      False
      <resource-ref>

      <res-ref-name>jdbc/default</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Shareable</res-sharing-scope>
      </resource-ref>


      And my jar file contains the local, localhome, pk, and the bean implementation (plus deployment descriptors ofcoz).

      I tried deploying this jar file by drop it under the <jboss_server>/server/default/deploy/ directory, and I get errors saying "class not found" for both my local and localhome interfaces. here's the log:

      02:23:59,249 INFO [MainDeployer] Starting deployment of package: file:/C:/servers/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/enum.jar
      02:23:59,910 WARN [verifier] EJB spec violation:
      Bean : Enum
      Section: 22.2
      Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local home interface, if any,
      in the <local-home> element.
      Info : Class not found: net.ahmay.common.enum.EnumLocalHome

      02:23:59,920 WARN [verifier] EJB spec violation:
      Bean : Enum
      Section: 22.2
      Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local interface, if any, in th
      e element.
      Info : Class not found: net.ahmay.common.enum.EnumLocal

      02:23:59,920 WARN [verifier] EJB spec violation:
      Bean : Enum
      Section: 12.2.1
      Warning: The Bean Provider must provide a remote interface and a remote home interface or a local interface and a local
      home interface for the bean.

      02:23:59,950 WARN [EJBDeployer] Verify failed; continuing
      java.lang.NoClassDefFoundError: net/ahmay/common/enum/EnumLocal
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:1627)
      at java.lang.Class.privateGetPublicMethods(Class.java:1655)
      at java.lang.Class.getMethods(Class.java:815)
      at org.jboss.verifier.strategy.AbstractVerifier.hasEJBCreateMethod(AbstractVerifier.java:647)
      at org.jboss.verifier.strategy.EJBVerifier20.verifySessionBean(EJBVerifier20.java:1036)
      at org.jboss.verifier.strategy.EJBVerifier20.checkSession(EJBVerifier20.java:92)
      at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:159)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:472)...

      Anybody has any pointers? I tried deploying this guy exposing only remote interfaces, and it worked (or at least deployed) fine.

      Plz help. Thanks much.
      --may

        • 1. Re: local interface, jboss 3.2.1
          Adrian Brock Master

          jar -tf yourejb.jar

          Does your local interface use other classes
          you have not included?

          Regards,
          Adrian

          • 2. Re: local interface, jboss 3.2.1
            May Huang Newbie

            ------------------------------------------------------
            C:\projects\ahmay\common\build\lib>jar -tf enum.jar
            META-INF/
            META-INF/MANIFEST.MF
            net/
            net/ahmay/
            net/ahmay/common/
            net/ahmay/common/enum/
            net/ahmay/common/enum/EnumBean.class
            net/ahmay/common/enum/EnumController.class
            net/ahmay/common/enum/EnumControllerBean.class
            net/ahmay/common/enum/EnumControllerException.class
            net/ahmay/common/enum/EnumControllerHome.class
            net/ahmay/common/enum/EnumControllerHomeLocal.class
            net/ahmay/common/enum/EnumControllerLocal.class
            net/ahmay/common/enum/EnumData.class
            net/ahmay/common/enum/EnumLocal.class
            net/ahmay/common/enum/EnumLocalHome.class
            net/ahmay/common/enum/EnumPK.class
            net/ahmay/common/enum/InvalidEnumPKException.class
            META-INF/ejb-jar.xml
            META-INF/jboss.xml
            --------------------------------------------------------------

            The local interfaces themselves do NOT reference anything outside of java.* and javax.*. The bean implementation does.

            In my manifest.mf, I do have a Class-Path entry, pointing to a lib.jar in the same directory. This jar file is found by the deployer/classloader -- I tried moving the file somewhere else, deployer barf'd about cannot find referenced jar file.

            thx,
            --may