Error running Spring Boot Application in IntelliJ IDEA after adding dependencies

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.

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

Edit: Using Windows 10

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?

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

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.

you should check Run window, something like this:
Screenshot%20from%202018-11-28%2014-54-24

When running without said dependencies, no arguments occur.

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

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

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

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