问题描述
直接用main方法是可以查出数据的,但是一用action调就出现如下问题,由于小弟刚学lucene,哪位高手遇到过请赐教,谢谢!2011-09-06 15:40:57,156 INFO [com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor] - java.lang.reflect.InvocationTargetExceptionat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.sseinfonet.ib.util.advice.ParmeterInterceptor.intercept(ParmeterInterceptor.java:60)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)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.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)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:175)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:286)at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)at java.lang.Thread.run(Unknown Source)Caused by: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/Analyzerat com.sseinfonet.ib.action.cn.infoDisclosure.CorporateNoticeAction.queryTitleByKeywords(CorporateNoticeAction.java:119)... 76 moreCaused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.Analyzerat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)... 77 more 问题补充:Rainbow702 写道
解决方案
引用Caused by: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/Analyzerat 是不是JAR导入出错了?