[jboss-user] [EJB/JBoss] - EJB spec violation (org.jboss.ejb.EJBDeployer.verifier) for

tbatlarge do-not-reply at jboss.com
Mon Aug 21 22:32:02 EDT 2006


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?

Cheers,
Tom B.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966581#3966581

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966581



More information about the jboss-user mailing list