0 Replies Latest reply on Aug 21, 2006 10:32 PM by tbatlarge

    EJB spec violation (org.jboss.ejb.EJBDeployer.verifier) for

    tbatlarge Newbie

      Declaring a string array in an EJB's remote interface causes a verification error in EJBDeployer.verifier.

      // BeanInterface.java:
      public interface BeanInterface {
       static String aString = "foobar";
       static String[] anArray = { "foo", "bar" }; // Commenting this out fixes the issue
       void foo() throws java.rmi.RemoteException;
      // BeanRemote.java:
      public interface BeanRemote extends javax.ejb.EJBObject, BeanInterface {
      // BeanHome.java:
      public interface BeanHome extends javax.ejb.EJBHome {
       BeanRemote create() throws javax.ejb.CreateException, java.rmi.RemoteException;
      // Bean.java:
      public class Bean implements javax.ejb.SessionBean, BeanInterface {
       javax.ejb.SessionContext sessionContext;
       public void setSessionContext(javax.ejb.SessionContext sessionContext) { this.sessionContext = sessionContext; }
       public void ejbActivate() { }
       public void ejbPassivate() { }
       public void ejbRemove() throws java.rmi.RemoteException { }
       public void ejbCreate() throws javax.ejb.CreateException { }
       public void foo() throws java.rmi.RemoteException { }
      WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : Bean
      Method : public abstract BeanRemote create() throws CreateException, RemoteException
      Section: 6.10.6
      Warning: The method return values in the home interface must be of valid types for RMI/IIOP.

      (The ejb-jar.xml and jboss.xml files are vanilla, and not shown here.)
      Commenting out the "anArray" declaration in BeanInterface.java fixes the error.

      Does anyone know if the EJB spec does not allow an array to be declared in a remote interface?

      Tom B.