# Error running Spring Boot Application in IntelliJ IDEA after adding dependencies

**URL:** <https://discuss.elastic.co/t/error-running-spring-boot-application-in-intellij-idea-after-adding-dependencies/158574>\
**Category:** Elasticsearch\
**Created:** [November 28, 2018, 1:17pm UTC](https://discuss.elastic.co/t/error-running-spring-boot-application-in-intellij-idea-after-adding-dependencies/158574 "2018-11-28T13:17:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jordy\_Swinnen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jordy_swinnen/32/38185_2.png) [@Jordy\_Swinnen](https://discuss.elastic.co/u/Jordy_Swinnen)\
**Post date:** [November 28, 2018, 1:17pm UTC](https://discuss.elastic.co/t/error-running-spring-boot-application-in-intellij-idea-after-adding-dependencies/158574/1 "2018-11-28T13:17:35Z")

</div>

I'm trying to index documents from a Spring Boot application to a local Elasticsearch Docker container using the these gradle dependencies.  
`compile('org.elasticsearch:elasticsearch:6.5.1')`  
`compile('org.elasticsearch.client:transport:6.5.1')`

However, with these dependencies i cannot run my application. My IntelliJ IDEA Event Log returns the following error:  
`Error running 'MyBackendApplication': Command line is too long. Shorten command line for MyBackendApplication or also for Spring Boot default configuration.`

After some googeling, i have tried to select a different option in my run configuration, but this is no valid solution since for some reason it takes several minutes for the application to start when i select something else.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/0/905206a9df327c317fbcab4fbb477a4d8edf8cfa.png)

Why is this happening, and how do i solve this issue?

Edit: Using Windows 10

---

<div class="post-metadata">

**Author:** ![mats990](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mats990/32/37516_2.png) [@mats990](https://discuss.elastic.co/u/mats990)\
**Post date:** [November 28, 2018, 1:37pm UTC](https://discuss.elastic.co/t/error-running-spring-boot-application-in-intellij-idea-after-adding-dependencies/158574/2 "2018-11-28T13:37:44Z")

</div>

I don't think that this question is ES specific but I'll try to help you.  
Can you share command line arguments from IDEA output?

---

<div class="post-metadata">

**Author:** ![Jordy\_Swinnen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jordy_swinnen/32/38185_2.png) [@Jordy\_Swinnen](https://discuss.elastic.co/u/Jordy_Swinnen)\
**Post date:** [November 28, 2018, 1:42pm UTC](https://discuss.elastic.co/t/error-running-spring-boot-application-in-intellij-idea-after-adding-dependencies/158574/3 "2018-11-28T13:42:08Z")

</div>

Do you mean "Program arguments:" in Run/Debug config? I have none.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/7/a74154b49a4e8207bc1129c4cf2b6abc08b408ee.png)

Apologies if this is wrong location to ask, but adding either of the EC dependencies listed above will make me unable to run my application. So i thought it was okay to ask here.

---

<div class="post-metadata">

**Author:** ![mats990](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mats990/32/37516_2.png) [@mats990](https://discuss.elastic.co/u/mats990)\
**Post date:** [November 28, 2018, 1:55pm UTC](https://discuss.elastic.co/t/error-running-spring-boot-application-in-intellij-idea-after-adding-dependencies/158574/4 "2018-11-28T13:55:31Z")

</div>

you should check Run window, something like this:  
 ![Screenshot%20from%202018-11-28%2014-54-24](https://us1.discourse-cdn.com/elastic/original/3X/2/8/2889eb88d4673d3e71325bffde82871f83a5f29b.png)

---

<div class="post-metadata">

**Author:** ![Jordy\_Swinnen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jordy_swinnen/32/38185_2.png) [@Jordy\_Swinnen](https://discuss.elastic.co/u/Jordy_Swinnen)\
**Post date:** [November 28, 2018, 2:17pm UTC](https://discuss.elastic.co/t/error-running-spring-boot-application-in-intellij-idea-after-adding-dependencies/158574/5 "2018-11-28T14:17:22Z")

</div>

When running without said dependencies, no arguments occur.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/2/324d9ccc0f9f9601e69ceecdae59de523b597405.png)

When adding Elastic dependencies, there's no run window available. The error occurs in event log. Can not run application.

---

<div class="post-metadata">

**Author:** ![mats990](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mats990/32/37516_2.png) [@mats990](https://discuss.elastic.co/u/mats990)\
**Post date:** [November 28, 2018, 2:24pm UTC](https://discuss.elastic.co/t/error-running-spring-boot-application-in-intellij-idea-after-adding-dependencies/158574/6 "2018-11-28T14:24:44Z")

</div>

That's ok, now what you need to do is to click on the first line where ":\Program Files" is and to check what you have in that command. I suppose that your command line is too long

---

<div class="post-metadata">

**Author:** ![Jordy\_Swinnen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jordy_swinnen/32/38185_2.png) [@Jordy\_Swinnen](https://discuss.elastic.co/u/Jordy_Swinnen)\
**Post date:** [November 28, 2018, 2:38pm UTC](https://discuss.elastic.co/t/error-running-spring-boot-application-in-intellij-idea-after-adding-dependencies/158574/7 "2018-11-28T14:38:57Z")

</div>

After further investigation it seems to be something caused by Apache Tika and unrelated to ES after all. i flagged this question for it to be closed. Apologies

---

<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:** [December 26, 2018, 2:39pm UTC](https://discuss.elastic.co/t/error-running-spring-boot-application-in-intellij-idea-after-adding-dependencies/158574/8 "2018-12-26T14:39:02Z")

</div>

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