title: PrebuiltTransportClient org.elasticsearch.transport.Netty3Plugin Class not found
body: <p>So this Elasticsearch project is really kicking my ass. My latest problem is upon executing</p>
  
  <pre><code>TransportClient client = new PreBuiltTransportClient(Settings.EMPTY);
  </code></pre>
  
  <p>I get this error: java.lang.ClassNotFoundException:org.elasticsearch.transport.Netty3Plugin. Full stacktrace below:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/elasticsearch/transport/Netty3Plugin
  org.elasticsearch.transport.client.PreBuiltTransportClient.&lt;clinit&gt;(PreBuiltTransportClient.java:54)
  com.inspirave.controller.DBTest.testFunction(DBTest.java:87)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  java.lang.reflect.Method.invoke(Unknown Source)
  org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
  org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
  org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
  org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
  org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
  com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:205)
  com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:266)
  </code></pre>
  
  <p>Has anyone ever dealt with this error before and if so what can I do? Thank you for the help.</p>
  
  <p>EDIT 1&amp;2:</p>
  
  <p>After some further testing I've found that the first error is replaced by this error after refreshing the page. Here is its stacktrace.</p>
  
  <pre><code>java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.transport.client.PreBuiltTransportClient
  com.inspirave.controller.DBTest.elasticTestFunction(DBTest.java:55)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  java.lang.reflect.Method.invoke(Unknown Source)
  org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
  org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
  org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
  org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
  org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
  com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:205)
  com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:266)
  </code></pre>