# Error with JDBC mapping:elasticsearch

**URL:** <https://discuss.elastic.co/t/error-with-jdbc-mapping-elasticsearch/25784>\
**Category:** Elasticsearch\
**Created:** [July 17, 2015, 10:08am UTC](https://discuss.elastic.co/t/error-with-jdbc-mapping-elasticsearch/25784 "2015-07-17T10:08:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![poonam](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@poonam](https://discuss.elastic.co/u/poonam)\
**Post date:** [July 17, 2015, 10:08am UTC](https://discuss.elastic.co/t/error-with-jdbc-mapping-elasticsearch/25784/1 "2015-07-17T10:08:43Z")

</div>

# Hi , when I am trying to add mapping to index I am getting above "ElasticsearchIllegalStateException: client is closed" issue.but if I execute without mapping it works fine. My sence JSON

PUT /kbdbtest  
{  
"index":  
{  
"analysis": {

```
   "filter": {
              "de_stop_filter": {
  "type": "stop",
  "stopwords": ["_german_"]
},
"de_stem_filter": {
  "type": "stemmer",
  "name": "minimal_german"
},
"en_stop_filter": {
  "type": "stop",
  "stopwords": ["_english_"]
},
"en_stem_filter": {
  "type": "stemmer",
  "name": "minimal_english"
}
             },
   "analyzer":
   {
     

     "de_analyzer": {
  "type": "custom",
  "filter": ["de_stop_filter", "de_stem_filter"],
  "tokenizer": "standard"
},

"en_analyzer": {
  "type": "custom",
  "filter": ["en_stop_filter", "en_stem_filter"],
  "tokenizer": "standard"
}

  } 
 }

```

}  
}

get /kbdbtest  
PUT /kbdbtest/searchproducts/\_mapping  
{

```
    "search_analyzer" : "standard", 
    "properties" : {
       
        "solid" : {"type":"integer" },
        "title": {"type": "string"},
        "AffectedReleases" : {
            "type" : "string" }

        
        
    }        

```

}

PUT [http://localhost:9200/kbdbtest/searchproducts/\_meta](http://localhost:9200/kbdbtest/searchproducts/_meta)  
{  
"type":"jdbc",  
"jdbc":  
{  
"driver": "com.microsoft.sqlserver.jdbc.SQLServerDriver",  
"url":"jdbc:sqlserver://usalvwaldbqa1:1433;databaseName=es",  
"user":"es",  
"password":"Answ3r21",  
"sql":"SELECT top 1 solid,title,AffectedReleases FROM es.es.g\_fast\_solutions\_soho ",

"index" : "kbdbtest",  
"type" : "searchproducts"

}  
}

---

<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:** [July 6, 2017, 12:00am UTC](https://discuss.elastic.co/t/error-with-jdbc-mapping-elasticsearch/25784/2 "2017-07-06T00:00:49Z")

</div>

Closed on July 6, 2017, 12:00am UTC


