You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Madhan Neethiraj <ma...@apache.org> on 2022/12/02 17:23:35 UTC

Re: Review Request 74088: RANGER-3859: fix the trino-plugin test failure

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74088/#review224940
-----------------------------------------------------------



Alvin - what brings slf4j-log4j12.jar library in test classpath? Unit tests in plugin-trino didn't run into this issue with JDK17.

- Madhan Neethiraj


On Dec. 2, 2022, 9:57 a.m., Alvin Wo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74088/
> -----------------------------------------------------------
> 
> (Updated Dec. 2, 2022, 9:57 a.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-3859
>     https://issues.apache.org/jira/browse/RANGER-3859
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Fix the test error `java.lang.IllegalStateException: Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path, preempting StackOverflowError.` for plugin Trino.
> 
> ```
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.295 s <<< FAILURE! - in org.apache.ranger.authorization.trino.authorizer.RangerSystemAccessControlTest
> [ERROR] org.apache.ranger.authorization.trino.authorizer.RangerSystemAccessControlTest  Time elapsed: 0.289 s  <<< ERROR!
> java.lang.ExceptionInInitializerError
> 	at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:72)
> 	at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:45)
> 	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
> 	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
> 	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
> 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
> 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
> 	at org.apache.ranger.authorization.trino.authorizer.RangerSystemAccessControl.<clinit>(RangerSystemAccessControl.java:61)
> 	at org.apache.ranger.authorization.trino.authorizer.RangerSystemAccessControlTest.setUpBeforeClass(RangerSystemAccessControlTest.java:70)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
> 	at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> 	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:377)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:284)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:248)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:167)
> 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456)
> 	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169)
> 	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595)
> 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581)
> Caused by: java.lang.IllegalStateException: Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path, preempting StackOverflowError. See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.
> 	at org.slf4j.impl.Log4jLoggerFactory.<clinit>(Log4jLoggerFactory.java:54)
> 	... 28 more
> ```
> 
> PR link: https://github.com/apache/ranger/pull/168
> 
> 
> Diffs
> -----
> 
>   plugin-trino/pom.xml e7c82edfa 
> 
> 
> Diff: https://reviews.apache.org/r/74088/diff/1/
> 
> 
> Testing
> -------
> 
> - run unit tests under plugin-trino module
> - run tests under the root project
> 
> 
> Thanks,
> 
> Alvin Wo
> 
>