-
Notifications
You must be signed in to change notification settings - Fork 24.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClassNotFoundException: org.apache.log4j.PropertyConfigurator [2.3.1] #17585
Comments
I believe that you have to include it explicitly as it's marked as optional: https://github.com/elastic/elasticsearch/blob/2.x/core/pom.xml#L166-L175 |
Yeah, but why is it marked optional if you cannot to start the program without it? |
Because you can provide another implementation if you wish. |
Hi got the same issue with 2.3.2, https://github.com/elastic/elasticsearch/blob/2.x/core/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java#L243 being called whatever config you do, https://github.com/elastic/elasticsearch/blob/2.x/core/src/main/java/org/elasticsearch/common/logging/log4j/LogConfigurator.java#L128 is triggered and load log4j so it is not optional so shouldn't be marked as such in the pom IMO. Having a es.log flag == jul could allow to skip it and avoid this noclassdeffounderror. |
As of 2.3.something log4j isn't optional in the server. In the client it should be. The problem is that the client shares the same pom and jar as the server. Both of those things are known bad but not actively being worked on other than the initiative to provide a REST based java client. |
Elasticsearch version: 2.3.1
JVM version: 1.8
OS version: Ubuntu 14.04
Description of the problem including expected versus actual behavior:
We have a custom build of elaticsearch with embedded plugins, which we build as a single JAR (using scala & sbt-assembly). Now, if we try to upgrade elasticsearch dependency from
2.2.0
to2.3.1
we will getjava.lang.ClassNotFoundException: org.apache.log4j.PropertyConfigurator
on startup.Everything works in
2.2.0
so I assume there is something fishy with the maven declarations?The text was updated successfully, but these errors were encountered: