行动是治愈恐惧的良药,而犹豫、拖延将不断滋养恐惧。

es5.0创建client对象报错

Elasticsearch | 作者 yemaohai2016 | 发布于2016年11月10日 | 阅读数:4588




TransportClient client = new PreBuiltTransportClient(settings);
报错如下
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/apache/logging/log4j/Logger
org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1287)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

 
QQ图片20161110151706.png
已邀请:

roc - 如:80后IT男..

赞同来自:

显然缺包啊,哥们。。
增加maven如下:
  <!-- https://mvnrepository.com/arti ... -core -->
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-core</artifactId>
    <version>2.6.2</version>
</dependency>
 
 <!-- https://mvnrepository.com/arti ... j-api -->
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-api</artifactId>
    <version>2.6.2</version>
</dependency>
 
 

要回复问题请先登录注册