当前位置: 代码迷 >> Java Web开发 >> Struts+hibernate整合有关问题!java.lang.reflect.InvocationTargetException
  详细解决方案

Struts+hibernate整合有关问题!java.lang.reflect.InvocationTargetException

热度:7222   发布时间:2013-02-25 21:21:40.0
Struts+hibernate整合问题!java.lang.reflect.InvocationTargetException
我没什么分,各位大牛请见谅!
Struts、hibernate单独测试ok ,一整合就出现错误!
jar包如下:
hibernate
  |--antlr-2.7.6.jar
  |--commons-collections-3.1.jar
  |--dom4j-1.6.1jar
  |--jta-1.1.jar
  |--slf4j-nop-1.6.4.jar
  |--slf4j-api-1.6.4.jar
  |--hibernate3.jar
Web App Libraries(这里是struts的jar包)
  |--asm-3.1.jar
  |--asm-commons-3.1.jar
  |--asm-tree-3.1.jar
  |--commons-fileupload-1.2.2.jar
  |--commons-io-2.0.1.jar
  |--commons-lang-2.5.jar
  |--freemarker-2.3.16.jar
  |--javassist-3.11.0.GA.jar
  |--ognl-3.0.1.jar
  |--struts2-core-2.2.3.1.jar
  |--xwork-core-2.2.3.1.jar


运行时出现以下信息:

Stacktraces

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:592)
  com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
  com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
  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:248)
  com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
  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:248)
  com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
  com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
  com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
  ......(信息太长,这里省略了一些!)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  相关解决方案