解决方案 »
- 如何配置web服务
- 静态页面复制进eclipse后的JS问题
- Tomcat与OSGi集成问题
- asdasd
- HttpSessionListener做在线人数统计的问题
- jbuilder 2006 EJB出现异常javax.naming.NameNotFoundException: Unable to resolve 'bmp' Resolved ; remaining name 'bmp'
- tomcat配置的数据源怎么可以在非web app的程序里应用
- 非常简单的问题,看你能不能答出来!
- <aop:around>出现异常,求解。。。
- JB2005+WebSphere开发实体Bean(CMP)编译的时候出错~!高手帮帮忙
- restfull和基本的http有什么区别呢?
- 【分享】关于cxf方式访问电视台webservice的问题
Struts Problem ReportStruts has detected an unhandled exception:Messages:
File: com/hibernate/bean/StudentDAO.java
Line number: 54
Stacktracesjava.lang.NullPointerException后台就抛出了
org.hibernate.InvalidMappingException: Could not parse mapping document from res
ource com/hibernate/bean/Lesson.hbm.xml.....Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role ma
pping com.hibernate.bean.Lesson.problems
com.hibernate.bean.StudentDAO.findById(StudentDAO.java:54)我用了StudentDAO的这样一个方法
public Student findById(java.lang.Long id) {
log.debug("getting Student instance with id: " + id);
try {
Student instance = (Student) getSession().get( //这句话抛出错误
"com.hibernate.bean.Student", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public Session getSession() {
return HibernateSessionFactory.getSession();
}
}