1 Reply Latest reply on Nov 20, 2003 5:22 AM by ppetit

    No remote interface exception within an ear

    ppetit

      Hi Forum,

      I use JBoss 3.2.2 with Tomcat 4.1.27 embedded on windows

      I have a POJO packaged in the same jar than my EJBs (Entity BMP) that is a client of those Entity beans.

      I only declared local interfaces for my EJBs.
      My EJB-JAR and JBOSS xml files refers only to local-home(s) and local interfaces.

      My class gets the InitialContext and manages successfully the jndi lookup. (the home interface is returned normally).
      a findByPrimaryKey methods returns my Bean.
      The log indicates that the Bean is activated after the invocation of the bean implementation instance.

      But when begining the invocation of a method on the Bean, I get a "No remote interface defined" exception :

      [org.jboss.ejb.plugins.EntityInstanceInterceptor] Ending invoke, exceptionThrown, ctx=org.jboss.ejb.EntityEnterpriseContext@1eee7b7
      javax.ejb.EJBException: null; CausedByException is:
      No remote interface defined.
      at org.jboss.ejb.plugins.BMPPersistenceManager.loadEntity(BMPPersistenceManager.java:433)

      Again my plain java class is loaded by Jboss and its log through Log4j is well managed in the JBoss console, so I'm in the same VM than the EJB Container.

      Any Help is welcome.
      Philippe

        • 1. Re: No remote interface exception within an ear
          ppetit

          Hi Forum,
          Still stuck with a class trying to use an EJB.
          All are packaged in the same JAR.
          The EJB declares only local interfaces :

          <ejb-name>Title</ejb-name>
          <local-home>com.foo.ejb.TitleHome</local-home>
          com.foo.ejb.Title
          <ejb-class>com.foo.ejb.TitleBeanBMP</ejb-class>
          <persistence-type>Bean</persistence-type>
          <prim-key-class>java.math.BigDecimal</prim-key-class>
          False

          The jboss.xml declares JNDI like this :

          <ejb-name>Title</ejb-name>
          <local-jndi-name>ejb/foo/local/Title</local-jndi-name>

          <resource-ref>
          <res-ref-name>jdbc/MSSQLDS</res-ref-name>
          <jndi-name>java:/MSSQLDS</jndi-name>
          </resource-ref>


          I access like this :
          InitialContext iniCtx = new InitialContext();
          TitleHome home = (TitleHome ) iniCtx.lookup("ejb/foo/local/Title");
          Title title= home.findByPrimaryKey(new BigDecimal(cookie));
          BigDecimal statut = title.getStsId();

          All get fine until the invocation of title.getStsId();
          I get here a :
          javax.ejb.EJBException: null; CausedByException is:
          No remote interface defined.
          at org.jboss.ejb.plugins.BMPPersistenceManager.loadEntity(BMPPersistenceManager.java:433)

          I don't understand what's happening. I haven't defined any JNDI properties as we are in same VM...

          Where could I be wrong ?
          Please Help...