-
Notifications
You must be signed in to change notification settings - Fork 2k
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
NoClassDefFound exception at water.logging.LoggerFactory #6725
Milestone
Comments
We have the same issue. Looks like only adding water as dependency could resolve it as long as this bug is not fixed? |
This is happening when we are just trying to load DRF, with no water dependecies needed. It works ok for XGB i.e. at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [gaia.cu7.algo.classification.supervised.ClassificationTaker]: Factory method 'classificationTaker' threw exception; nested exception is java.lang.NoClas
sDefFoundError: org/apache/log4j/Priority
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 47 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Priority
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at water.logging.LoggerFactory.isWaterLogAvailable(LoggerFactory.java:79)
at water.logging.LoggerFactory.<init>(LoggerFactory.java:19)
at water.logging.LoggerFactory.<clinit>(LoggerFactory.java:7)
at hex.genmodel.algos.tree.SharedTreeMojoModel.<clinit>(SharedTreeMojoModel.java:30)
at java.base/java.lang.Class.forName0(Native Method) |
yazun
added a commit
to Sednai/h2o-3
that referenced
this issue
Jul 27, 2023
Fix the regression that caused DRF loading fail due to spurious dependency on slf4j when log4j2 exists. Check for water logging availability was throwing exception if slf4j was not used while loading some models. this seems like a regression between 3.30 and 3.40. h2oai#6725
This was referenced Jul 27, 2023
yazun
added a commit
to Sednai/h2o-3
that referenced
this issue
Aug 18, 2023
Fix the regression that caused DRF loading fail due to spurious dependency on slf4j when log4j2 exists. Check for water logging availability was throwing exception if slf4j was not used while loading some models. this seems like a regression between 3.30 and 3.40. h2oai#6725
mn-mikke
added a commit
that referenced
this issue
Nov 10, 2023
mn-mikke
added a commit
that referenced
this issue
Nov 13, 2023
Thanks a lot! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello
Upgrading from 3.30.x to 3.40.x raises this exception when initialising the water logging class in my client java application:
I see in the code that only ClassNotFound is caught but not NoClassDefFound
Indeed in my class path I use only log4j2 libraries so I do not have
Probably I missed something while upgrading, but how could I force my client not to use water logging system. I'd like to use only log4j2 as in 3.30x. More precisely I don't want to depend on log4j 1 versions...
Thanks for help
The text was updated successfully, but these errors were encountered: