解决方案 »
- axis2 调用webservice方法 参数传递问题 参数为空
- url汉字参数乱码问题,求解
- 如何设置http代理
- [200分]求大侠那里有hibernate的详细配置和所名(最好能用呀,项目急用)!
- 一个action,多个input的webwork验证问题
- jbuilder+JBOSS求救!!!
- 大家是不是觉得在本版越来越不如以前了,有些问题一百年都没人理了:(
- 关于java 字符集的问题
- 紧急问题:JAVA 怎样调用 VB的COM(DLL)
- org.xml.sax.XMLReader类的setFeature方法有什么作用
- 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();
}
}