0 Replies Latest reply on Sep 23, 2002 8:28 AM by ddenev

    Method not found in bean class: remove(Object)

    ddenev

      Hi,

      I have a stateless session bean:

      local interface:
      package com.eurisko.oktabit.utils.ejb;
      import javax.ejb.*;
      public interface ImageGetterLocal extends EJBLocalObject {
      public Object getImage(String imageId) throws FinderException;
      }
      local home interface:
      package com.eurisko.oktabit.utils.ejb;
      import javax.ejb.*;
      public interface ImageGetterLocalHome extends EJBLocalHome {
      public ImageGetterLocal create() throws CreateException;
      }
      bean class:
      package com.eurisko.oktabit.utils.ejb;
      import java.util.*;
      import javax.ejb.*;
      import javax.naming.*;
      import com.eurisko.oktabit.ejb.product.*;
      import com.eurisko.ejb.utils.EJBHomeFactory;
      public class ImageGetterEJB implements SessionBean {
      ...
      public Object getImage(String imageId) throws FinderException {
      ...
      }
      public void setSessionContext(SessionContext sCtx) {}
      public void ejbCreate() {}
      public void ejbRemove() {}
      public void ejbActivate() {}
      public void ejbPassivate() {}
      }
      ejb-jar.xml:
      ...

      <ejb-name>ImageGetter</ejb-name>
      <local-home>com.eurisko.oktabit.utils.ejb.ImageGetterLocalHome</local-home>
      com.eurisko.oktabit.utils.ejb.ImageGetterLocalHome
      <ejb-class>com.eurisko.oktabit.utils.ejb.ImageGetterEJB</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>

      ...
      <assembly-descriptor>
      <container-transaction>

      <ejb-name>Company</ejb-name>
      <method-name>*</method-name>

      </container-transaction>
      </assembly-descriptor>
      ...
      jboss.xml:
      ...

      <ejb-name>ImageGetter</ejb-name>
      <local-jndi-name>ejb/ImageGetter</local-jndi-name>

      ...

      and when I deploy I get the exception:
      ...
      14:21:23,324 ERROR [EjbModule] Initialization failed
      java.lang.NoSuchMethodException: Method not found in bean class: remove(Object)
      ...

      Does anybody know what's going on?

      10x in advance.