# Is there any example of logstash-filter with loading \*.jar

**URL:** <https://discuss.elastic.co/t/is-there-any-example-of-logstash-filter-with-loading-jar/103424>\
**Category:** Logstash\
**Created:** [October 10, 2017, 7:14pm UTC](https://discuss.elastic.co/t/is-there-any-example-of-logstash-filter-with-loading-jar/103424 "2017-10-10T19:14:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmaci3k](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@kmaci3k](https://discuss.elastic.co/u/kmaci3k)\
**Post date:** [October 10, 2017, 7:14pm UTC](https://discuss.elastic.co/t/is-there-any-example-of-logstash-filter-with-loading-jar/103424/1 "2017-10-10T19:14:02Z")

</div>

I'm trying to use in my custom logstash filter a Java code bundled in .jar. I tried to play with lock\_jar which downloads all dependencies of .jar. The .jar and all its dependencies are then added to lib/java and bundled in gem.  
When I run my filter in logstash I keep getting could not load Java class 'com.company.app.ClassA'.

I'm looking for an example how to load in jruby a class from any .jar (.jar with dependencies).

---

<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 7, 2017, 7:14pm UTC](https://discuss.elastic.co/t/is-there-any-example-of-logstash-filter-with-loading-jar/103424/2 "2017-11-07T19:14:31Z")

</div>

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