论坛首页 入门技术论坛

Hibernate 3 过滤器问题

浏览 1714 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-01-18  
1: 本人在使用Hibernate 3.1定义的过滤器,显示时出错,如下所示 ;困惑了几天,不知有哪位遇到过否?
                                      谢谢 !!
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.

exception
javax.servlet.ServletException: Filter execution threw an exception
root cause
java.lang.NoClassDefFoundError
cn.hxex.message.util.HibernateFilter.doFilter(HibernateFilter.java:63)

2:单元测试时获取的DAO接口实例为空,不知是哪个环节出错了.见附件 :

import junit.framework.TestCase;
import cn.hxex.message.dao.IMessageDAO;
import cn.hxex.message.dao.IUserDAO;
import cn.hxex.message.util.DaoFactory;
//测试内容:DaoFactory的getDao()方法对象能否正确的接口的实例
public class TestDaoFactory extends TestCase {
//开始测试时系统初始化
protected void setUp() throws Exception {
super.setUp();
}
//测试结束后调用,资源释放
protected void tearDown() throws Exception {
super.tearDown();
}

public void testDaoFactory()
{
IUserDAO userDAO = (IUserDAO)DaoFactory.getDao( "userDao" );
assertNotNull( "User DAO is NULL!", userDAO );

IMessageDAO messageDAO = (IMessageDAO)DaoFactory.getDao( "messageDao" );
assertNotNull( "Message DAO is NULL!", messageDAO );

}

}
论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics