5 Replies Latest reply on Jan 9, 2004 5:19 AM by thunder_jb


    thunder_jb Newbie

      Hi all,
      Been getting a strange issue: on startup or redeploy I get messages similar to the following from the EJBDeployer,

      17:38:57,953 INFO [EJBDeployer]
      Bean : JBUserEJB
      Method : public abstract JBUser findByPrimaryKey(Long) throws FinderException, RemoteException
      Section: 12.2.9
      Warning: The method return types defined in an Entity beans home interface MUST be legal types for RMI/IIOP.

      Problem is, all the method returns is an instance of the bean!
      It appears to happen after I've changed the bean - maybe added a new column or changed an existing one but it doesn't appear to affect behaviour.

      Anyone know whats causing it or have any ideas?

      Thanks in advance.

        • 1. Re: 12.2.9
          Adrian Brock Master

          The problem is with your JBUser interface.


          • 2. Re: 12.2.9
            thunder_jb Newbie

            Well, this is my interface:

            public interface JBUser extends EJBObject {
            public Long getUserId();
            public void setUserId(Long userId) throws RemoteException;
            public String getUsername() throws RemoteException;
            public void setUsername(String username) throws RemoteException;
            public String getPassword() throws RemoteException;
            public void setPassword(String password) throws RemoteException;

            It looks OK to me?
            I have actually since dropped the underlying table and let JBoss recreate it from scratch so it should be consistent. As it stands I have 3 columns, the numerical PK and varchar2's for others. It's about as straightforward as tables get!

            • 3. Re: 12.2.9
              Greg Newbie

              I have a vague recollection of getting this error, and it turned out it was nothing to do with the actual error message.

              I think (?) it was something to do with me not including the correct exceptions in the method declarations. Are you including throws RemoteException everywhere?

              • 4. Re: 12.2.9
                Juha Lindfors Master

                Your getUserId() is missing a RemoteException declaration.

                • 5. Re: 12.2.9
                  thunder_jb Newbie

                  Ah! Yes that's probably it. Completely missed that.
                  Nothing like a second pair of eyes on your code...