- 爱易网页
-
Java教程
- 请各位帮忙 hibernate save导致操作错误
日期:2014-05-17 浏览次数:20696 次
请各位帮忙 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里面找问题吧