You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "dugujiujiang (via GitHub)" <gi...@apache.org> on 2025/08/15 00:14:00 UTC
[PR] RANGER-3696 java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory [ranger]
dugujiujiang opened a new pull request, #628:
URL: https://github.com/apache/ranger/pull/628
## What changes were proposed in this pull request?
(Please fill in changes proposed in this fix. Create an issue in ASF JIRA before opening a pull request and
set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. RANGER-XXXX: Fix a typo in YYY))
## How was this patch tested?
(Please explain how this patch was tested. Ex: unit tests, manual tests)
(If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RANGER-3696 java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory [ranger]
Posted by "mneethiraj (via GitHub)" <gi...@apache.org>.
mneethiraj commented on code in PR #628:
URL: https://github.com/apache/ranger/pull/628#discussion_r2279856099
##########
ranger-elasticsearch-plugin-shim/pom.xml:
##########
@@ -55,12 +55,25 @@
<artifactId>commons-lang</artifactId>
<version>${commons.lang.version}</version>
</dependency>
-
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>${slf4j-api.version}</version>
- <scope>runtime</scope>
+ <groupId>org.apache.logging.log4j</groupId>
Review Comment:
`ranger-elasticsearch-plugin-shim.jar` shouldn't require log4j implementation libraries; Sources in this library only refer to `org.slf4j.Logger` and `org.slf4j.LoggerFactory`; so depdency on `slf4j-api` should be the enough. The implementation libraries, log4j for Elasticsearch, should be picked up at runtime from Elasticsearch classpath. It shouldn't be necessary to package them with Ranger plugin.
Also, looking at the stack trace in RANGER-3696, it seems Elastisearch already has class isolation in place for plugins (so that libraries used in the plugin are not visible to Elasticsearch). If this is true, then I suggest getting rid of ranger-elasticsearch-plugin-shim library altogether.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RANGER-3696 java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory [ranger]
Posted by "mneethiraj (via GitHub)" <gi...@apache.org>.
mneethiraj closed pull request #628: RANGER-3696 java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
URL: https://github.com/apache/ranger/pull/628
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RANGER-3696 java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory [ranger]
Posted by "mneethiraj (via GitHub)" <gi...@apache.org>.
mneethiraj commented on PR #628:
URL: https://github.com/apache/ranger/pull/628#issuecomment-3710898059
Please review my previous comment and reopen this PR if any changes are needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org