当前位置: 代码迷 >> Java Web开发 >> Hibernate4+Struts2的2.3版本+Spring3.1.2整合出现的小异常、
  详细解决方案

Hibernate4+Struts2的2.3版本+Spring3.1.2整合出现的小异常、

热度:8814   发布时间:2013-02-25 21:11:08.0
Hibernate4+Struts2的2.3版本+Spring3.1.2整合出现的小错误、、、
下面的异常:
Java code
java.lang.reflect.InvocationTargetException    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    java.lang.reflect.Method.invoke(Method.java:597)    com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)    com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:255)    org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)    org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)    org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)root causejava.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session;    org.springframework.orm.hibernate3.SessionFactoryUtils.doGetSession(SessionFactoryUtils.java:324)    org.springframework.orm.hibernate3.SessionFactoryUtils.getSession(SessionFactoryUtils.java:235)    org.springframework.orm.hibernate3.HibernateTemplate.getSession(HibernateTemplate.java:457)    org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:393)    org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)    org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)    org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:904)    edu.jmi.dao.impl.StudentDaoHibernate.find(StudentDaoHibernate.java:40)    edu.jmi.service.impl.StudentServiceImpl.findAllStudent(StudentServiceImpl.java:42)    edu.jmi.action.StudentAction.doFind(StudentAction.java:22)    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    java.lang.reflect.Method.invoke(Method.java:597)    com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)    com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:255)    org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)    com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
  相关解决方案