solr常見異常解決辦法
阿新 • • 發佈:2018-12-29
啟動tomcat時如果報下面的錯誤:
嚴重: Exception starting filter SolrRequestFilter
java.lang.NoClassDefFoundError: com/codahale/metrics/MetricSetat java.lang.Class.getDeclaredConstructors0(Native Method)at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)at java.lang.Class.getConstructor0(Class.java:3075)at java.lang.Class.newInstance(Class.java:412)at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:119)at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4700)at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5340)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1092)at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1834)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)at java.lang.Thread.run(Thread.java:745)Caused by: java.lang.ClassNotFoundException: com.codahale.metrics.MetricSetat org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)... 20 more
請把solr-6.4.1/server/lib下的metrics-core-3.1.2.jar,metrics-ganglia-3.1.2.jar,metrics-graphite-3.1.2.jar,metrics-jetty9-3.1.2.jar,metrics-jvm-3.1.2.jar這幾個jar包放到tomcat下的solr專案的WEB-INF/lib目錄下。
嚴重: Exception starting filter SolrRequestFilter
java.lang.NoClassDefFoundError: com/codahale/metrics/MetricSetat java.lang.Class.getDeclaredConstructors0(Native Method)at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)at java.lang.Class.getConstructor0(Class.java:3075)at java.lang.Class.newInstance(Class.java:412)at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:119)at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4700)at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5340)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1092)at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1834)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)at java.lang.Thread.run(Thread.java:745)Caused by: java.lang.ClassNotFoundException: com.codahale.metrics.MetricSetat org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)... 20 more
請把solr-6.4.1/server/lib下的metrics-core-3.1.2.jar,metrics-ganglia-3.1.2.jar,metrics-graphite-3.1.2.jar,metrics-jetty9-3.1.2.jar,metrics-jvm-3.1.2.jar這幾個jar包放到tomcat下的solr專案的WEB-INF/lib目錄下。