3 Replies Latest reply on Jul 15, 2002 3:32 PM by Dain Sundstrom

    ejbRemove throws IllegalArgumentException

    Nayyer Kamran Newbie

      Hi there,

      I am getting IllegalArgumentException when I try to remove entity bean. what I do is I Call findByPrimaryKey and then call remove method over the Remote object. At this point it throws Illegal argument exception. I am using JBoss 2.4.4, MS SQLServer 2000 and Microsoft's JDBC4 type driver for SQLServer 2000.

      Every suggestion will be appreciated.

      Regards,

      Nayyer Kamran

        • 1. Re: ejbRemove throws IllegalArgumentException
          Nayyer Kamran Newbie

          hi every one,

          Is there nobody in all this forum have ever encountered this problem or never removed any entity bean.
          I have tried a very simple removel i.e inserted a record in database and tried to remove it with remote object remove method after finding it with findByPrimaryKey method. It thorws exception on removel the exception message is,

          Load failed; nested exception is: java.lang.IllegalArgumentException; nested exception is: java.rmi.ServerException: Load failed; nested exception is: java.lang.IllegalArgumentException


          every kind of suggestion and help regarding it will be appreciated.

          Thanks,

          Nayyer Kamran

          • 2. Re: ejbRemove throws IllegalArgumentException
            Joel Vogt Master

            well okay, removing entity beans should not have any problems at all.
            Is your method declaration in your bean something like

            public void ejbRemove()
            throws RemoveException, EJBException, RemoteException
            {
            }

            ?

            • 3. Re: ejbRemove throws IllegalArgumentException
              Dain Sundstrom Master

              This attacking tone won't get you far here.

              There are many testcases in the JBoss Testsuite which add and remove entities. My guess is the entit is miscoded or misconfigured. What is the actual exception on the serverside (check the server.log file).