当前位置:编程学习 > JAVA >>

请各位帮忙 hibernate save导致操作异常

public class TbpicturesDaoImpl extends HibernateDaoSupport  implements TbpicturesDao {
// save操作
public void addPics(Tbpictures pic) {

System.out.println(pic.getPicname());
System.out.println(pic.getPicpath());
System.out.println(pic.getStuno());
//System.out.println(pic.getPicid());
this.getHibernateTemplate().save(pic);
System.out.println("--------ok-----");
}
}

输出结果:
222
3498957754341.dll
1101
save操作没执行

异常信息:
严重: Could not find action or result
/ClassManage/hdzx/uploadone.action
No result defined for action com.wu.app.action.TbpicturesAction and result /exception.jsp
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:376)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:278)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:510)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:722)
--------------------编程问答-------------------- 控制台也没有输出sql语句?数据库也没有?看着像struts --------------------编程问答-------------------- 严重: Could not find action or result
/ClassManage/hdzx/uploadone.action
No result defined for action com.wu.app.action.TbpicturesAction and result /exception.jsp
这不已经说得很清楚了么,没找到action类或该类对应的结果,去action里面找问题吧 --------------------编程问答-------------------- action没问题,action中我设置了标志位都输出了,就是hibernate存储数据的问题,查询可以执行 --------------------编程问答-------------------- No result defined for action com.wu.app.action.TbpicturesAction and result /exception.jsp

是不是没写 return SUCCESS;或是return INPUT;?
补充:Java ,  Web 开发
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,