2 Replies Latest reply on Feb 20, 2002 1:56 PM by Justin Miranda

    Exceptions/Verifier in JBoss 2.4.3

    Chris Newbie


      Hey all,

      I'm sure I'm doing something stupid here, but I can't find what it is. For some reason, the verifier seems to think that I'm not labelling exceptions appropriately. In fact, all I'm able to throw seem to be RemoteExceptions from the bean itself. For example, this works:

      Bean:
      ...
      java.rmi.RemoteException;

      public void someMethod() throws RemoteException {
      }


      Remote Interface:
      ...
      java.rmi.RemoteException;
      ...
      public void someMethod() throws RemoteException {
      }

      As you'd expect it to. If instead you try this:

      Bean:
      ...
      import java.rmi.RemoteException;
      import java.rmi.activation.ActivationException;
      ..
      public void someMethod() throws RemoteException, ActivationExeption {
      }

      Remote interface:
      ...
      import java.rmi.RemoteException;
      import java.rmi.activation.ActivationException;
      ..
      public void someMethod() throws RemoteException, ActivationExeption {
      }

      The verifier produces an error:

      Bean: ...
      Method : public abstract void someMethod() throws RemoteException
      Section: 6.10.5
      Warning: All the exceptions defined in the throws clause of the matching method of the session bean class must be defined in the throws clause of the method of the remote interface.

      Has anyone seen and solved this problem? The exceptions which are doing this are serializable and inherit from java.lang.Exception. I really want to avoid catching and rethrowing as a new type if possible.

      Thanks for any guidance you can throw my way!

      Chris

        • 1. Re: Exceptions/Verifier in JBoss 2.4.3
          Chris Newbie

          Additional information:

          I came back this morning, and rebuilt the project. The verifier error has disappeared, though I haven't changed the code. If I have additional information, I'll come back and post. Seems to be an intermittent problem.

          Chris

          • 2. Re: Exceptions/Verifier in JBoss 2.4.3
            Justin Miranda Newbie

            I ran into the same problem. I fixed errors that caused the verifier warnings, and after redeploying the bean, the same errors keep popping up. I've run the verifier outside of jboss and it succeeds. However, if i deploy the bean within jboss, the verifier fails. It probably has to do with the tmp directory used to cache deployed beans, but I can't seem to work out how to fix it. If you have any suggestions, please let me know. Thanks.

            justin