2 Replies Latest reply on Jul 5, 2003 12:12 PM by Keith Pemberton

    Session Bean abstract methods???

    Keith Pemberton Newbie

      I have a stateless session bean in which I have defined two methods: addBlog and getBlog. The methods are void and BlogLocal respectively. When I try to deploy the bean, a Deployment exception says that I should have the same methods declared in the bean class as I do in the remote interface. Below is how I have decalred the methods first in the bean class and then in the remote interface:

      Bean Class Declaration:
      public void addBlog(Integer id, String body, String date, String quote) {
      ......
      }

      public BlogLocal getBlog(Integer id) { ...... }

      Remote Interface Declaration:

      public void addBlog(Integer id, String body, String date, String quote) throws RemoteException;

      public BlogLocal getBlog(Integer id) throws RemoteException;

      Here are the error messages that am receiving:

      14:59:29,332 WARN [verifier] EJB spec violation:
      Bean : BlogAdderEJB
      Method : public abstract void addBlog(Integer, String, String, String) throws RemoteException
      Section: 7.10.5
      Warning: The methods defined in the remote interface must have a matching method in the bean's class with the same name and same number and types of arguments.

      14:59:29,334 WARN [verifier] EJB spec violation:
      Bean : BlogAdderEJB
      Method : public abstract BlogLocal getBlog(Integer) throws RemoteException
      Section: 7.10.5
      Warning: The methods defined in the remote interface must have a matching method in the bean's class with the same name and same number and types of arguments.

      Why would it think that the two methods in the RemoteInterface are "abstract"? Your help is very much appreciated!

      Keith