关于"Could not load ejb proxy class com.appweb.services.ejb.messagebox.IEmailReceiveDAO"的解决方法

这几周在弄ejb,如果注册AppModel里的类中jndi名称和路径不对的话,就会报下面的错误:

javax.naming.NamingException: Could not load ejb proxy class com.appweb.services.ejb.messagebox.IEmailReceiveDAO [Root exception is java.lang.ClassNotFoundException: com.appweb.services.ejb.messagebox.IEmailReceiveDAO from [Module "deployment.appDD.ear.appweb.war:main" from Service Module Loader]]

发现是因为IEmailReceiveDAO的类路径不对而找不到类,改为       super("EmailReceiveDAOImpl!com.app.services.ejb.messagebox.IEmailReceiveDAO");后正常;

public class EmailReceiveServiceImpl extends BaseServiceImpl implements IEmailReceiveService{
    public EmailReceiveServiceImpl(){
        super("EmailReceiveDAOImpl!com.appweb.services.ejb.messagebox.IEmailReceiveDAO");
    }

}

posted @ 2022-10-09 17:25  c_huabo  阅读(23)  评论(0)    收藏  举报