查询和添加是成功了,那么配置什么的是没问题的
但是我在做删除时却报错
org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity: java.lang.Integer; nested exception is org.hibernate.MappingException: Unknown entity: java.lang.Integer
@Override
public void DelInfo(int id) {
// TODO Auto-generated method stub
super.getHibernateTemplate().delete(id);
}
---------------------------------------------------------------dao实现
public String doDelInfo(){
td.DelInfo(two.getId());
return "do_DelInfo";
}
——————————————————————————————action<td><a href="/my_struts2/t/tblUser_doDelInfo?two.id=<s:property value="#two.id"/>">删除</a></td>
——————————-————————————————————————前台jsp就是按这个超链接传id 根据id删除请大侠帮忙
但是我在做删除时却报错
org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity: java.lang.Integer; nested exception is org.hibernate.MappingException: Unknown entity: java.lang.Integer
@Override
public void DelInfo(int id) {
// TODO Auto-generated method stub
super.getHibernateTemplate().delete(id);
}
---------------------------------------------------------------dao实现
public String doDelInfo(){
td.DelInfo(two.getId());
return "do_DelInfo";
}
——————————————————————————————action<td><a href="/my_struts2/t/tblUser_doDelInfo?two.id=<s:property value="#two.id"/>">删除</a></td>
——————————-————————————————————————前台jsp就是按这个超链接传id 根据id删除请大侠帮忙
解决方案 »
- Java可以调用WCF提供的NetTcpBing协议的服务吗?
- 刚接触H,带条件的删除怎么写呀??
- 用JAVA怎么编写自动备份(还原)SQL数据库?
- 如何实现HibernateTemplate,JdbcTemplate 分布式事务
- 如何取得网站上的所有sessionID
- 怎么在内存中生成xml文件 请高手指点
- structs如何在tomcat下使用,其相关的配置过程是怎么样的,请大家赐教,多谢了!
- STRUTS框架中,如何从数据库表中取数据(100条)?300分
- mdb接收到信息并处理完毕后怎么样把成功信息返回到发送信息的程序,并在界面中反应出来?
- .git文件怎么瘦身?
- 关于 servlet&tomcat连接oracle 老出错的问题 请大家指点 谢谢!
- struts2 怎样将 URL 的 test.action 屏蔽掉直接访问 test 就可以访问
<column name="id" />
<generator class="native" />
</id>
这个哪里错了?自动生成的 我也没改
里面应该放一个对象吧
org.springframework.dao.DataIntegrityViolationException: not-null property references a null or transient value: cn.jb.entity.Two.username; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: cn.jb.entity.Two.username
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:645)
org.springframework.dao.DataIntegrityViolationException: not-null property references a null or transient value: cn.jb.entity.Two.username; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: cn.jb.entity.Two.username
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:645)