0
當我嘗試在Spring框架中創建一個bean時沒有找到類。Got NoClassDefFoundError:org/apache/solr/common/params/SolrParams
[2017-06-15 18:25:33, ERROR, FrameworkServlet (470),localhost-startStop-1] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'interceptorInitializator' defined in file [D:\Program Files\tomcat8\webapps\ROOT\WEB-INF\classes\cn\org\farseer\esb\interceptors\init\InterceptorInitializator.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cn.org.farseer.esb.interceptors.init.HandlerInterceptors': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/solr/common/params/SolrParams
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
所致這樣的問題:java.lang.NoClassDefFoundError:組織/阿帕奇/ Solr的/共同/ PARAMS/SolrParams \t在java.lang.Class.getDeclaredMethods0(本機方法) \t在java.lang.Class.privateGetDeclaredMethods(Class.java:2531) \t在java.lang.Class.getDeclaredMethods(Class.java: 1855) – popgeh
i當我把它放到我的春季節目中時,我不知道爲什麼會這樣。雖然我在做junit測試,但它工作。 – popgeh