關於"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");
    }

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章