Hi all,
when I try to deploy my beans, I get the following message: 

WARN  [verifier] EJB spec violation: 
Bean   : Studente
Method : public abstract StudenteLocal checkPassword(Long, String) throws 
FinderException
Section: 12.2.11
Warning: Each local home method must match a method defined in the entity bean class.

13:06:12,818 WARN  [verifier] EJB spec violation: 
Bean   : Admin
Method : public abstract AdminLocal checkPassword(Integer, String) throws 
FinderException
Section: 12.2.11
Warning: Each local home method must match a method defined in the entity bean class.

13:06:13,036 WARN  [verifier] EJB spec violation: 
Bean   : Docente
Method : public abstract DocenteLocal checkPassword(Long, String) throws 
FinderException
Section: 12.2.11
Warning: Each local home method must match a method defined in the entity bean class.


ERROR [MainDeployer] could not create deployment: 
file:/Applications/jboss-3.2.2/server/default/deploy/MyExams.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see 
above for error messages.
        at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:491)
        at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
        at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
        at $Proxy6.deploy(Unknown Source)
        at 
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
        at 
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
        at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
        at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
        at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)


The query is the following (in the EntityBean):

@ejb.finder
 *              signature = "bean.cmp.AdminLocal checkPassword(java.lang.Integer 
userId, java.lang.String passwd)" 
 *              query = "SELECT OBJECT(a) FROM Admin a where a.id_admin = ?1 and 
a.password = ?2"


and this is the code of the SessionBean:

public class CambioPasswdBean implements SessionBean {
        
        private SessionContext ctx;
        private StudenteLocalHome studentHome= null;
        private DocenteLocalHome docenteHome = null;
        private AdminLocalHome adminHome = null;

......


/**
         * @ejb.interface-method
         *      view-type="remote"
         * @return void
         * @throws InvalidParameterException
         * @throws javax.ejb.FinderException
         * @throws EJBException 
         * @param Object id utente
         * @param String old password
         * @param String new password
         */
        public void changePassword(Object id, String oldPasswd, String newPasswd, int 
ruolo){
                switch (ruolo)
                {
                case 0: //amministratore
                {
                        Debug.print(this.getClass().getName() + " changePassword");
                        try{ 
                                AdminLocal al = null;
                                if((al = adminHome.checkPassword((Integer)id, 
oldPasswd)) != null){
                                        al.setPassword(newPasswd);
                                }
                                else{
                                        Debug.err("Password non valida!");
                                        throw new InvalidParameterException("Password 
non valida");
                                }
                        }catch(Exception e){
                                Debug.err(e.getMessage());
                        }
                }
                break;
                
                case 1: //docente
                {
                        Debug.print(this.getClass().getName() + " changePassword");
                        try{
                                DocenteLocal dl = null;
                                if((dl = docenteHome.checkPassword((Long)id, 
oldPasswd)) != null){
                                        dl.setPassword(newPasswd);
                                }
                                else{
                                        Debug.err("Password non valida!");
                                        throw new InvalidParameterException("Password 
non valida");
                                }
                        }catch(Exception e){
                                Debug.err(e.getMessage());
                        }
                }
                break;
                
                case 2: //studente
                {
                        Debug.print(this.getClass().getName() + " changePassword");
                        try{
                                StudenteLocal sl = null;
                                if((sl = 
studentHome.checkPassword((Long)id,oldPasswd)) != null){
                                        sl.setPassword(newPasswd);
                                }
                                else{
                                        Debug.err("Password non valida!");
                                        throw new InvalidParameterException("Password 
non valida");
                                }
                                
                        }catch(Exception e){
                                Debug.err(e.getMessage());
                        }
                }               
                break;
                }
        }/*changePassword*/

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

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


-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to