solr+tomcat整合的检索服务搭建也成功了,现在想把项目里的内容都索引一下
启动项目运行结果报错,求解
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.jfinal.aop.Invocation.invoke(Invocation.java:85)
at cn.jfinalbbs.interceptor.CommonInterceptor.intercept(CommonInterceptor.java:43)
at com.jfinal.aop.Invocation.invoke(Invocation.java:65)
at com.jfinal.ext.interceptor.SessionInViewInterceptor.intercept(SessionInViewInterceptor.java:44)
at com.jfinal.aop.Invocation.invoke(Invocation.java:65)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74)
at cn.jfinalbbs.handler.HtmlHandler.handle(HtmlHandler.java:17)
at com.jfinal.plugin.druid.DruidStatViewHandler.handle(DruidStatViewHandler.java:75)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2462)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2451)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.jfinal.aop.Invocation.invoke(Invocation.java:71)
... 26 more
Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V
at org.apache.http.impl.auth.BasicScheme.authenticate(BasicScheme.java:168)
at org.apache.http.client.protocol.RequestAuthenticationBase.authenticate(RequestAuthenticationBase.java:120)
at org.apache.http.client.protocol.RequestAuthenticationBase.process(RequestAuthenticationBase.java:99)
at org.apache.http.client.protocol.RequestTargetAuthentication.process(RequestTargetAuthentication.java:80)
at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:132)
at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:166)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:485)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:466)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:235)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:227)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:135)
at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:896)
at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:859)
at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:874)
at cn.jfinalbbs.solr.SolrUtil.deleteAll(SolrUtil.java:48)
at cn.jfinalbbs.solr.SolrController.delete(SolrController.java:24)
... 31 more
你的JDK是错的把,直接用的Eclipse自带的,你换一下试试回复<aclass='referer'target='_blank'>@朋也:Causedby:java.lang.NoSuchMethodError:org.apache.commons.codec.binary.Base64.<init>(I)V这个报错通常是使用的ECLIPSE自带的JDK导致的,应该重新配置成自己的JDK。回复<aclass='referer'target='_blank'>@首席撸出血:配置了的,是jdk1.8,开发工具是idea或者你本地的JDK环境有没有配置缺jar包啊,<spanstyle="color:#444444;font-family:'MicrosoftYaHei',Verdana,sans-serif,宋体;font-size:14px;line-height:normal;background-color:#FFFFFF;">apache.commons.codec这个包估计所使用的jar版本过低了;如果有多个,可删除低版本的试试这个包有的Base64是commons-codec1.0才加入的类,确认下本地的版本是不是不对,另外也确认下是不是存在两个不同版本的jar包冲突
<divclass='ref'>
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。