在部署solr的时候,出现了这个问题
java.lang.NoClassDefFoundError: org/apache/lucene/analysis/Analyzer
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_221]
at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_221]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_221]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[?:1.8.0_221]
at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_221]
at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_221]
at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_221]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_221]
at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_221]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_221]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_221]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_221]
at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_221]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1271) ~[catalina.jar:8.5.16]
at java.lang.ClassLoader.loadClass(ClassLoader.java:411) ~[?:1.8.0_221]
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817) ~[?:1.8.0_221]
at java.lang.ClassLoader.loadClass(ClassLoader.java:411) ~[?:1.8.0_221]
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817) ~[?:1.8.0_221]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_221]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_221]
at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_221]
找不到这个类,但是我在solr的lib目录下查看了一下,确实是有的,不知道为什么。后来我想着solr_home我是拷贝其他地方已经配置好了的,里面有配置的ik分词器,但是我的solr里面没有添加对应的ik分词器的jar包,肯定是会出错的,然而报错确看着和ik分词器没关系,我想着把ik的jar包先放上去看看吧,结果放上去之后,就不再报错了。