java.lang.AbstractMethodError:org.springframework.orm.hibernate3.SpringSessionSynchronization.afterCommit()V

时间:2015-04-01 10:06:48

标签: java hibernate spring-mvc

我正在创建一个Spring MVC Web应用程序。我正在给我的应用程序提供HttpRequest -

http://localhost:8080/MVC_CRUD_SPRING/add

下面是我在EmployeeController中编写的代码,它使用路径'/ add'

处理请求
@RequestMapping(value="/add",method=RequestMethod.GET)
public ModelAndView addEmployee(EmployeeBean employeeBean,BindingResult bindingResult){
    Map<String, Object> model=new HashMap<String,Object>();
    model.put("employees", prepareListOfEmployeeBeans(employeeService.listEmployees()));
    return new ModelAndView("addEmployee","command",model);
}

在调试代码时点击URL后,我可以看到员工对象被成功检索。

enter image description here

但发布这个我得到以下错误并请求无法呈现请求的页面,错误是说正在调用抽象方法

Apr 01, 2015 3:28:01 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [employee] in context with path  [/MVC_CRUD_SPRING] threw exception [Handler processing failed; nested exception is java.lang.AbstractMethodError: org.springframework.orm.hibernate3.SpringSessionSynchronization.afterCommit()V] with root cause
java.lang.AbstractMethodError: org.springframework.orm.hibernate3.SpringSessionSynchronization.afterCommit()V
at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:133)
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:121)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:951)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:797)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

对此的任何帮助都将受到高度赞赏。

0 个答案:

没有答案