# Pipeline aborted due to error - exception=\>java.lang.ClassCastException - Error while fetching data using Salesforce plugin

**URL:** <https://discuss.elastic.co/t/pipeline-aborted-due-to-error-exception-java-lang-classcastexception-error-while-fetching-data-using-salesforce-plugin/253439>\
**Category:** Logstash\
**Created:** [October 27, 2020, 12:50pm UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-exception-java-lang-classcastexception-error-while-fetching-data-using-salesforce-plugin/253439 "2020-10-27T12:50:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavitra\_Poojary](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavitra_poojary/32/77753_2.png) [@Pavitra\_Poojary](https://discuss.elastic.co/u/Pavitra_Poojary)\
**Post date:** [October 27, 2020, 12:50pm UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-exception-java-lang-classcastexception-error-while-fetching-data-using-salesforce-plugin/253439/1 "2020-10-27T12:50:49Z")

</div>

Hi,

I am trying to pull the Salesforce data using the salesforce plugin available in Logstash. Below is my configuration.

ELK Version : 7.4

```
input {
  salesforce {
   use_test_sandbox => true
    client_id => 'xxx'
    client_secret => 'xxx'
    username => 'xxx'
    password => 'xxx'
    security_token => 'xxx'
    sfdc_object_name => 'xxx'
  }
}
output {
 elasticsearch {
    hosts => ["https://xxx:443"] //443 because using Managed ElasticSearch
    index => "salesforcelog-%{+YYYY.MM}"
       user => "xxx"
        password => "xxx"
        ilm_enabled => false //using this for Managed ES 
  }
    stdout { codec => rubydebug }
}

```

I end up getting the below error.

`[ERROR] 2020-10-27 09:16:09.119 [[main]-pipeline-manager] javapipeline - Pipeline aborted due to error {:pipeline_id=>"main", :exception=>java.lang.ClassCastException: org.jruby.ext.set.RubySet cannot be cast to org.jruby.RubyFixnum`

Please help me resolve this !! Thank you

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 27, 2020, 2:58pm UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-exception-java-lang-classcastexception-error-while-fetching-data-using-salesforce-plugin/253439/2 "2020-10-27T14:58:44Z")

</div>

Is there a stack trace for that error message?

---

<div class="post-metadata">

**Author:** ![Pavitra\_Poojary](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavitra_poojary/32/77753_2.png) [@Pavitra\_Poojary](https://discuss.elastic.co/u/Pavitra_Poojary)\
**Post date:** [October 27, 2020, 4:44pm UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-exception-java-lang-classcastexception-error-while-fetching-data-using-salesforce-plugin/253439/3 "2020-10-27T16:44:15Z")

</div>

Hi Thank you for the reply !!

Please find the complete message :

`[ERROR] 2020-10-27 16:33:28.392 [[main]-pipeline-manager] javapipeline - Pipeline aborted due to error {:pipeline\_id=\>"main", :exception=\>java.lang.ClassCastException: org.jruby.ext.set.RubySet cannot be cast to org.jruby.RubyFixnum, :backtrace=\>["org.jruby.runtime.invokedynamic.MathLinker.fixnum\_op\_lshift(MathLinker.java:297)", "java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)", "org.jruby.runtime.invokedynamic.MathLinker.fixnumOperator(MathLinker.java:171)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_middleware\_minus\_0\_dot\_14\_dot\_0.lib.faraday\_middleware.response.follow\_redirects.RUBY$method$initialize$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday\_middleware-0.14.0/lib/faraday\_middleware/response/follow\_redirects.rb:71)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)", "org.jruby.RubyClass.newInstance(RubyClass.java:915)", "org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)", "org.jruby.ir.runtime.IRRuntimeHelpers.classSuper(IRRuntimeHelpers.java:1171)", "org.jruby.ir.runtime.IRRuntimeHelpers.classSuperSplatArgs(IRRuntimeHelpers.java:1161)", "org.jruby.ir.targets.ClassSuperInvokeSite.invoke(ClassSuperInvokeSite.java:38)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.middleware.RUBY$method$new$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/middleware.rb:21)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.rack\_builder.RUBY$method$build$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/rack\_builder.rb:48)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.rack\_builder.RUBY$block$to\_app$1(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/rack\_builder.rb:167)", "org.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:146)", "org.jruby.runtime.BlockBody.yield(BlockBody.java:122)", "org.jruby.runtime.Block.yieldArray(Block.java:182)", "org.jruby.RubyEnumerable$27.call(RubyEnumerable.java:1077)", "org.jruby.runtime.BlockCallback.call(BlockCallback.java:40)", "org.jruby.runtime.CallBlock.doYield(CallBlock.java:92)", "org.jruby.runtime.BlockBody.yield(BlockBody.java:116)", "org.jruby.runtime.Block.yield(Block.java:170)", "org.jruby.RubyArray.each(RubyArray.java:1800)", "org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen)", "org.jruby.RubyClass.finvoke(RubyClass.java:493)", "org.jruby.runtime.Helpers.invoke(Helpers.java:430)", "org.jruby.RubyEnumerable.callEach(RubyEnumerable.java:103)", "org.jruby.RubyEnumerable.injectCommon(RubyEnumerable.java:1072)", "org.jruby.RubyEnumerable.inject(RubyEnumerable.java:1093)", "org.jruby.RubyEnumerable$INVOKER$s$inject.call(RubyEnumerable$INVOKER$s$inject.gen)", "org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrTwoBlock.call(JavaMethod.java:602)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:177)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.rack\_builder.RUBY$method$to\_app$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/rack\_builder.rb:167)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.rack\_builder.RUBY$method$to\_app$0$ **VARARGS** (/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/rack\_builder.rb)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.rack\_builder.RUBY$method$app$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/rack\_builder.rb:156)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.rack\_builder.RUBY$method$app$0$ **VARARGS** (/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/rack\_builder.rb)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.rack\_builder.RUBY$method$build\_response$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/rack\_builder.rb:143)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.rack\_builder.RUBY$method$build\_response$0$ **VARARGS** (/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/rack\_builder.rb)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.connection.RUBY$method$run\_request$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/connection.rb:387)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.connection.RUBY$method$run\_request$0$ **VARARGS** (/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/connection.rb)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:177)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.faraday\_minus\_0\_dot\_15\_dot\_4.lib.faraday.connection.RUBY$method$get$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/faraday-0.15.4/lib/faraday/connection.rb:138)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.RubyClass.finvoke(RubyClass.java:505)", "org.jruby.RubyBasicObject.send(RubyBasicObject.java:1741)", "org.jruby.RubyKernel.send(RubyKernel.java:2193)", "org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.restforce\_minus\_4\_dot\_2\_dot\_2.lib.restforce.concerns.verbs.RUBY$block$define\_verb$1(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/restforce-4.2.2/lib/restforce/concerns/verbs.rb:37)", "org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:136)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:77)", "org.jruby.runtime.Block.call(Block.java:129)", "org.jruby.RubyProc.call(RubyProc.java:295)", "org.jruby.internal.runtime.methods.ProcMethod.call(ProcMethod.java:64)", "org.jruby.RubyClass.finvoke(RubyClass.java:505)", "org.jruby.RubyBasicObject.send(RubyBasicObject.java:1741)", "org.jruby.RubyKernel.send(RubyKernel.java:2193)", "org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.restforce\_minus\_4\_dot\_2\_dot\_2.lib.restforce.concerns.verbs.RUBY$block$define\_api\_verb$1(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/restforce-4.2.2/lib/restforce/concerns/verbs.rb:63)", "org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:136)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:77)", "org.jruby.runtime.Block.call(Block.java:129)", "org.jruby.RubyProc.call(RubyProc.java:295)", "org.jruby.internal.runtime.methods.ProcMethod.call(ProcMethod.java:64)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.restforce\_minus\_4\_dot\_2\_dot\_2.lib.restforce.concerns.api.RUBY$method$describe$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/restforce-4.2.2/lib/restforce/concerns/api.rb:128)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.logstash\_minus\_input\_minus\_salesforce\_minus\_3\_dot\_0\_dot\_6.lib.logstash.inputs.salesforce.RUBY$method$register$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-salesforce-3.0.6/lib/logstash/inputs/salesforce.rb:90)", "usr.share.logstash.vendor.bundle.jruby.$2\_dot\_5\_dot\_0.gems.logstash\_minus\_input\_minus\_salesforce\_minus\_3\_dot\_0\_dot\_6.lib.logstash.inputs.salesforce.RUBY$method$register$0$ **VARARGS** (/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-salesforce-3.0.6/lib/logstash/inputs/salesforce.rb)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.logstash\_minus\_core.lib.logstash.java\_pipeline.RUBY$block$register\_plugins$1(/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb:195)", "org.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:146)", "org.jruby.runtime.BlockBody.yield(BlockBody.java:114)", "org.jruby.runtime.Block.yield(Block.java:170)", "org.jruby.RubyArray.each(RubyArray.java:1800)", "usr.share.logstash.logstash\_minus\_core.lib.logstash.java\_pipeline.RUBY$method$register\_plugins$0(/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb:194)", "usr.share.logstash.logstash\_minus\_core.lib.logstash.java\_pipeline.RUBY$method$register\_plugins$0$ **VARARGS** (/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.logstash\_minus\_core.lib.logstash.java\_pipeline.RUBY$method$start\_inputs$0(/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb:296)", "usr.share.logstash.logstash\_minus\_core.lib.logstash.java\_pipeline.RUBY$method$start\_inputs$0$ **VARARGS** (/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.logstash\_minus\_core.lib.logstash.java\_pipeline.RUBY$method$start\_workers$0(/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb:252)", "usr.share.logstash.logstash\_minus\_core.lib.logstash.java\_pipeline.RUBY$method$start\_workers$0$ **VARARGS** (/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.logstash\_minus\_core.lib.logstash.java\_pipeline.RUBY$method$run$0(/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb:149)", "usr.share.logstash.logstash\_minus\_core.lib.logstash.java\_pipeline.RUBY$method$run$0$ **VARARGS** (/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)",

---

<div class="post-metadata">

**Author:** ![Pavitra\_Poojary](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavitra_poojary/32/77753_2.png) [@Pavitra\_Poojary](https://discuss.elastic.co/u/Pavitra_Poojary)\
**Post date:** [October 27, 2020, 4:45pm UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-exception-java-lang-classcastexception-error-while-fetching-data-using-salesforce-plugin/253439/4 "2020-10-27T16:45:13Z")

</div>

```
"org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "usr.share.logstash.logstash_minus_core.lib.logstash.java_pipeline.RUBY$block$start$1(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:108)", "org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:136)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:77)", "org.jruby.runtime.Block.call(Block.java:129)", "org.jruby.RubyProc.call(RubyProc.java:295)", "org.jruby.RubyProc.call(RubyProc.java:274)", "org.jruby.RubyProc.call(RubyProc.java:270)", "org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:105)", "java.lang.Thread.run(Thread.java:748)"], :thread=>"#<Thread:0x34c898b run>"}`
[ERROR] 2020-10-27 16:33:28.415 [Converge PipelineAction::Create<main>] agent - Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}
[DEBUG] 2020-10-27 16:33:28.457 [Api Webserver] agent - Starting puma
[DEBUG] 2020-10-27 16:33:28.465 [Api Webserver] agent - Trying to start WebServer {:port=>9600}
[DEBUG] 2020-10-27 16:33:28.473 [LogStash::Runner] os - Stopping
[DEBUG] 2020-10-27 16:33:28.500 [LogStash::Runner] jvm - Stopping
[DEBUG] 2020-10-27 16:33:28.501 [LogStash::Runner] persistentqueue - Stopping
[DEBUG] 2020-10-27 16:33:28.502 [LogStash::Runner] deadletterqueue - Stopping
[DEBUG] 2020-10-27 16:33:28.506 [LogStash::Runner] agent - Shutting down all pipelines {:pipelines_count=>0}
[DEBUG] 2020-10-27 16:33:28.508 [LogStash::Runner] agent - Converging pipelines state {:actions_count=>0}
[DEBUG] 2020-10-27 16:33:28.521 [Api Webserver] service - [api-service] start
[INFO] 2020-10-27 16:33:28.656 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=>9600}
[INFO] 2020-10-27 16:33:33.715 [LogStash::Runner] runner - Logstash shut down.
```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 27, 2020, 5:42pm UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-exception-java-lang-classcastexception-error-while-fetching-data-using-salesforce-plugin/253439/5 "2020-10-27T17:42:40Z")

</div>

That is strange. The salesforce client is initializing, and during initialization it does a [describe](https://github.com/logstash-plugins/logstash-input-salesforce/blob/4f34d24c5ed6b9ddb1f0ec0730710ddea9dd136d/lib/logstash/inputs/salesforce.rb#L90) of @sfdc\_object\_name. I believe that involves doing a GET on it. Down inside the faraday HTTP client it appears to blow up at [this](https://github.com/lostisland/faraday_middleware/blob/a46ae1a7a7c21b7c5be925f9eb46b31e89c4e094/lib/faraday_middleware/response/follow_redirects.rb#L71) line of code.

Looking at the error message

```auto
:exception=>java.lang.ClassCastException: org.jruby.ext.set.RubySet cannot be cast to org.jruby.RubyFixnum, 
:backtrace=>["org.jruby.runtime.invokedynamic.MathLinker.fixnum_op_lshift(MathLinker.java:297)",
"java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)", 
"org.jruby.runtime.invokedynamic.MathLinker.fixnumOperator(MathLinker.java:171)",

```

fixnum\_op\_lshift is what gets the exception. I cannot conceive how

```
  @convert_to_get = Set.new [303]
  @convert_to_get << 301 << 302 unless standards_compliant?

```

could throw that exception. @convert\_to\_get is a Set, why would it try to cast it to a Fixnum when adding a Fixnum (301) to the set?

This is in the initialize function, so I would expect it to always go through this code. It is not processing a redirect at this point, so it is not handling a response from Salesforce, it is initializing so that it can do so in the future.

I am baffled. Sorry I cannot be more help.

---

<div class="post-metadata">

**Author:** ![gamedevtuts9](https://avatars.discourse-cdn.com/v4/letter/g/f04885/32.png) [@gamedevtuts9](https://discuss.elastic.co/u/gamedevtuts9)\
**Post date:** [October 28, 2020, 5:57am UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-exception-java-lang-classcastexception-error-while-fetching-data-using-salesforce-plugin/253439/6 "2020-10-28T05:57:52Z")

</div>

maybe just by keeping a xml file, your whole issue may get solved and i got a similar answer..this may help you i guess [https://techanswered.com/question/e-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception/](https://techanswered.com/question/e-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception/)

---

<div class="post-metadata">

**Author:** ![Pavitra\_Poojary](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavitra_poojary/32/77753_2.png) [@Pavitra\_Poojary](https://discuss.elastic.co/u/Pavitra_Poojary)\
**Post date:** [October 28, 2020, 6:35am UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-exception-java-lang-classcastexception-error-while-fetching-data-using-salesforce-plugin/253439/7 "2020-10-28T06:35:47Z")

</div>

Hi ,

Thank you for the replies.

It seemed more of an issue with a Logstash version i.e 7.4

> <https://github.com/elastic/logstash/issues/11267>
>
> While running logstash from amazon services i am getting this issue. i am trying to export data from mongodb database in...

I upgraded logstash alone to 7.9 and executed the same code for Salesforce and it worked and index got created in my Managed ES.

---

<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:** [November 25, 2020, 6:35am UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-exception-java-lang-classcastexception-error-while-fetching-data-using-salesforce-plugin/253439/8 "2020-11-25T06:35:49Z")

</div>

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