Logstash add custom jars to java class path

how can i just add jars to logstash image ( i need them in order to be able to use custom jdbc driver ,) , when trying to do so the docker runs but fails after 1min .
this is the Dockerfile :

COPY ./*.jar /usr/share/logstash/logstash-core/lib/jars/
ENTRYPOINT ["/usr/local/bin/docker-entrypoint"]
.---

im getting errors like:

... 34 more
[2022-05-05T16:07:50,501][DEBUG][org.reflections.Reflections] could not scan file org/logstash/Rubyfier.class in url jar:file:/usr/share/logstash/logstash-core/lib/jars/logstash-core.jar!/ with scanner SubTypesScanner
org.reflections.ReflectionsException: could not create class object from file org/logstash/Rubyfier.class
at org.reflections.scanners.AbstractScanner.scan(AbstractScanner.java:32) ~[reflections-0.9.11.jar:?]
at org.reflections.Reflections.scan(Reflections.java:253) [reflections-0.9.11.jar:?]
at org.reflections.Reflections.scan(Reflections.java:202) [reflections-0.9.11.jar:?]
at org.reflections.Reflections.(Reflections.java:123) [reflections-0.9.11.jar:?]
at org.logstash.plugins.discovery.PluginRegistry.discoverPlugins(PluginRegistry.java:91) [logstash-core.jar:?]
at org.logstash.plugins.discovery.PluginRegistry.(PluginRegistry.java:69) [logstash-core.jar:?]
at org.logstash.plugins.discovery.PluginRegistry.getInstance(PluginRegistry.java:76) [logstash-core.jar:?]
at org.logstash.plugins.factory.PluginFactoryExt.(PluginFactoryExt.java:86) [logstash-core.jar:?]
at org.logstash.execution.JavaBasePipelineExt.initialize(JavaBasePipelineExt.java:73) [logstash-core.jar:?]
at org.logstash.execution.JavaBasePipelineExt$INVOKER$i$1$0$initialize.call(JavaBasePipelineExt$INVOKER$i$1$0$initialize.gen) [jruby.jar:?]
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:837) [jruby.jar:?]
at org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1169) [jruby.jar:?]
at org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuperSplatArgs(IRRuntimeHelpers.java:1156) [jruby.jar:?]
at org.jruby.ir.targets.InstanceSuperInvokeSite.invoke(InstanceSuperInvokeSite.java:39)
[jruby.jar:?]
at usr.share.logstash.logstash_minus_core.lib.logstash.java_pipeline.RUBY$method$initialize$0(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:47) [jruby.jar:?]
at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80) [jruby.jar:?]