# NameError: cannot load Java class org.apache.http.client.methods.HttpRequestBase

**URL:** <https://discuss.elastic.co/t/nameerror-cannot-load-java-class-org-apache-http-client-methods-httprequestbase/111108>\
**Category:** Logstash\
**Created:** [December 11, 2017, 1:59pm UTC](https://discuss.elastic.co/t/nameerror-cannot-load-java-class-org-apache-http-client-methods-httprequestbase/111108 "2017-12-11T13:59:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![picj86](https://avatars.discourse-cdn.com/v4/letter/p/c57346/32.png) [@picj86](https://discuss.elastic.co/u/picj86)\
**Post date:** [December 11, 2017, 1:59pm UTC](https://discuss.elastic.co/t/nameerror-cannot-load-java-class-org-apache-http-client-methods-httprequestbase/111108/1 "2017-12-11T13:59:12Z")

</div>

I have installed logstash-6.0.1 but while starting it from bin directory I am getting the below exception:

```
D:\SVS\logstash-6.0.1\bin>logstash -f logstash-simple.conf
NameError: cannot load Java class org.apache.http.client.methods.HttpRequestBase

                   for_name at org/jruby/javasupport/JavaClass.java:286
            get_proxy_class at org/jruby/javasupport/JavaUtilities.java:34
       block in java_import at uri:classloader:/jruby/java/core_ext/object.rb:49

                        map at org/jruby/RubyArray.java:2486
                java_import at uri:classloader:/jruby/java/core_ext/object.rb:36

                     <main> at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/g
ems/manticore-0.6.1-java/lib/manticore/java_extensions.rb:1
                    require at org/jruby/RubyKernel.java:955
                     (root) at uri:classloader:/jruby/kernel/kernel.rb:1
  <module:require_relative> at uri:classloader:/jruby/kernel/kernel.rb:13
                     <main> at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/g
ems/manticore-0.6.1-java/lib/manticore.rb:44
                    require at org/jruby/RubyKernel.java:955
                    require at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/g
ems/polyglot-0.3.5/lib/polyglot.rb:65
                     <main> at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/g
ems/manticore-0.6.1-java/lib/manticore.rb:14
                    require at org/jruby/RubyKernel.java:955
                    require at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/g
ems/polyglot-0.3.5/lib/polyglot.rb:65
                     <main> at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/g
ems/elasticsearch-transport-5.0.4/lib/elasticsearch/transport/transport/http/man
ticore.rb:1
                    require at org/jruby/RubyKernel.java:955
                    require at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/g
ems/polyglot-0.3.5/lib/polyglot.rb:65
                     <main> at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/g
ems/elasticsearch-transport-5.0.4/lib/elasticsearch/transport/transport/http/man
ticore.rb:1
                    require at org/jruby/RubyKernel.java:955
                    require at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/g
ems/polyglot-0.3.5/lib/polyglot.rb:65
                     <main> at D:/SVS/logstash-6.0.1/logstash-core/lib/logstash/
elasticsearch_client.rb:1
                    require at org/jruby/RubyKernel.java:955
                    require at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/g
ems/polyglot-0.3.5/lib/polyglot.rb:65
                     <main> at D:/SVS/logstash-6.0.1/logstash-core/lib/logstash/
elasticsearch_client.rb:5
                    require at org/jruby/RubyKernel.java:955
                    require at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/g
ems/polyglot-0.3.5/lib/polyglot.rb:65
                     <main> at D:/SVS/logstash-6.0.1/logstash-core/lib/logstash/
config/modules_common.rb:1
                    require at org/jruby/RubyKernel.java:955
                     <main> at D:/SVS/logstash-6.0.1/logstash-core/lib/logstash/
config/modules_common.rb:3
                    require at org/jruby/RubyKernel.java:955
                     <main> at D:\SVS\logstash-6.0.1\lib\bootstrap\environment.r
b:70

```

My Path settings on Winodow 7

```
D:\SVS\logstash-6.0.1\bin>echo %PATH%
C:\ProgramData\Oracle\Java\javapath;C:\app\oracle\product\11203\client32\bin;C:\
WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Windows
PowerShell\v1.0\;C:\Program Files (x86)\CheckPoint\Endpoint Security\Endpoint Co
mmon\bin;C:\app\SmarTeam\XCADConverters\;C:\app\SmarTeam\bin;C:\Program Files\Mi
crosoft SQL Server\110\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\Tor
toiseGit\bin;C:\Program Files\PuTTY\;C:\Program Files\Java\jdk1.8.0_141\bin

```

My Java\_Home settings in Environment variable:

```
D:\SVS\logstash-6.0.1\bin>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_141

D:\SVS\logstash-6.0.1\bin>

```

I tried it with below command and same errors:  
D:\SVS\logstash-6.0.1\bin\>logstash -e 'input { stdin { } } output { stdout {} }

NameError: cannot load Java class org.apache.http.client.methods.HttpRequestBas

```
               for_name at org/jruby/javasupport/JavaClass.java:286
        get_proxy_class at org/jruby/javasupport/JavaUtilities.java:34
   block in java_import at uri:classloader:/jruby/java/core_ext/object.rb:4

                    map at org/jruby/RubyArray.java:2486
            java_import at uri:classloader:/jruby/java/core_ext/object.rb:3

                 <main> at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/

```

ems/manticore-0.6.1-java/lib/manticore/java\_extensions.rb:1  
require at org/jruby/RubyKernel.java:955  
(root) at uri:classloader:/jruby/kernel/kernel.rb:1  
module:require\_relative at uri:classloader:/jruby/kernel/kernel.rb:13  
 at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/  
ems/manticore-0.6.1-java/lib/manticore.rb:44  
require at org/jruby/RubyKernel.java:955  
require at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/  
ems/polyglot-0.3.5/lib/polyglot.rb:65  
 at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/  
ems/manticore-0.6.1-java/lib/manticore.rb:14  
require at org/jruby/RubyKernel.java:955  
require at D:/SVS/logstash-6.0.1/vendor/bundle/jruby/2.3.0/  
ems/polyglot-0.3.5/lib/polyglot.rb:65  
.............

D:\SVS\logstash-6.0.1\bin\>

Can somebody help my in starting/configuring the Logstash in Window 7?

Thanks a lot in advance.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 8, 2018, 1:59pm UTC](https://discuss.elastic.co/t/nameerror-cannot-load-java-class-org-apache-http-client-methods-httprequestbase/111108/2 "2018-01-08T13:59:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
