# I'm trying to use the jdbc\_static plugin to join two tables from MySql and index it but I'm receiving this error (warning: already initialized constant Manticore::Client::ByteArrayEntity)

**URL:** <https://discuss.elastic.co/t/im-trying-to-use-the-jdbc-static-plugin-to-join-two-tables-from-mysql-and-index-it-but-im-receiving-this-error-warning-already-initialized-constant-manticore-bytearrayentity/359532>\
**Category:** Logstash\
**Tags:** jdbc\
**Created:** [May 15, 2024, 10:42am UTC](https://discuss.elastic.co/t/im-trying-to-use-the-jdbc-static-plugin-to-join-two-tables-from-mysql-and-index-it-but-im-receiving-this-error-warning-already-initialized-constant-manticore-bytearrayentity/359532 "2024-05-15T10:42:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danyal\_Danish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danyal_danish/32/131444_2.png) [@Danyal\_Danish](https://discuss.elastic.co/u/Danyal_Danish)\
**Post date:** [May 15, 2024, 10:42am UTC](https://discuss.elastic.co/t/im-trying-to-use-the-jdbc-static-plugin-to-join-two-tables-from-mysql-and-index-it-but-im-receiving-this-error-warning-already-initialized-constant-manticore-bytearrayentity/359532/1 "2024-05-15T10:42:41Z")

</div>

I'm trying to use the jdbc\_static plugin to join two tables from MySql and index it but I'm receiving this error (warning: already initialized constant Manticore::Client::ByteArrayEntity)

This is my pipeline:

```auto
input {
    jdbc_driver_library => "C://elastic-stack//JDBC//lib//mysql-connector-j-8.3.0.jar"
    jdbc_driver_class => "com.mysql.jdbc.Driver"
    jdbc_connection_string => "jdbc:mysql://localhost:3306/classicmodels"
    jdbc_user => "root"
    jdbc_password => "root123"
    schedule => "* * * * *"
    statement => "SELECT * from customers"
    use_column_value => true
    tracking_column => "customernumber"
    lowercase_column_names => true
}

filter {
  jdbc_static {
    loaders => [
      {
        id => "order_loader"
        query => "SELECT customerNumber, contactLastName, contactFirstName from customers c INNER JOIN orders o ON c.customerNumber = o.customerNumber"
        local_table => "orders"
      }
    ]
    local_db_objects => [
      {
        name => "orders"
        index_columns => ["customerNumber"]
        columns => [
          ["customerNumber", "INTEGER"],
          ["contactLastName", "VARCHAR(255)"],
          ["contactFirstName", "VARCHAR(255)"],
        ]
      }
    ]
    jdbc_driver_library => "C://elastic-stack//JDBC//lib//mysql-connector-j-8.3.0.jar"
    jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
    jdbc_connection_string => "jdbc:mysql://localhost:3306/classicmodels"
    jdbc_user => "root"
    jdbc_password => ""
    loader_schedule => "* * * * *"
  }

  if [customerNumber] {
    jdbc_static {
      local_lookups => [
        {
          query => "SELECT customerNumber, contactLastName, contactFirstName from customers c INNER JOIN orders o ON c.customerNumber = o.customerNumber"
          parameters => { "customerNumber" => "[customerNumber]" }
          target => "customer_data"
        }
      ]
      add_field => { "customerNumber" => "%{[customer_data][0][customerNumber]}" }
      add_field => { "customerLastName" => "%{[customer_data][0][customerLastName]}" }
      add_field => { "customerFistName" => "%{[customer_data][0][customerFirstName]}" }
    }
  }
}

output {
  elasticsearch {
    hosts => ["http://192.168.100.28:9200"]
    user => "elastic"
    password => ""
    index => "customers"
    ssl => false
    ssl_verification_mode => "none"
  }
}

```
