[
https://issues.apache.org/jira/browse/BEAM-11055?focusedWorklogId=507758&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-507758
]
ASF GitHub Bot logged work on BEAM-11055:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Nov/20 20:02
Start Date: 04/Nov/20 20:02
Worklog Time Spent: 10m
Work Description: suztomo edited a comment on pull request #13073:
URL: https://github.com/apache/beam/pull/13073#issuecomment-721920511
Interesting. Let me see.
`org.apache.logging.log4j.util.ReflectionUtil` is missing when running the
test.
```
java.lang.NoClassDefFoundError: org/apache/logging/log4j/util/ReflectionUtil
at
org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:42)
at
org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:48)
at
org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at org.apache.hive.hcatalog.common.HCatUtil.<clinit>(HCatUtil.java:83)
at
org.apache.beam.sdk.io.hcatalog.test.EmbeddedMetastoreService.<init>(EmbeddedMetastoreService.java:50)
at
org.apache.beam.sdk.io.hcatalog.HCatalogBeamSchemaTest.setupEmbeddedMetastoreService(HCatalogBeamSchemaTest.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
```
https://ci-beam.apache.org/job/beam_PreCommit_Java_Commit/14470/testReport/junit/org.apache.beam.sdk.io.hcatalog/HCatalogBeamSchemaTest/classMethod/
# Reproduce Problem
The command below reproduces the problem. It's strange that Gradle marks it
successful:
```
./gradlew -p ./sdks/java/io/hcatalog test
...
> Task :sdks:java:io:hcatalog:test
org.apache.beam.sdk.io.hcatalog.HCatalogIOTest > classMethod FAILED
java.lang.NoClassDefFoundError at HCatalogIOTest.java:88
Caused by: java.lang.ClassNotFoundException at HCatalogIOTest.java:88
org.apache.beam.sdk.io.hcatalog.HCatalogBeamSchemaTest > classMethod FAILED
java.lang.NoClassDefFoundError at HCatalogBeamSchemaTest.java:52
org.apache.beam.sdk.io.hcatalog.SchemaUtilsTest >
testParameterizedTypesToBeamTypes FAILED
java.lang.NoClassDefFoundError at SchemaUtilsTest.java:43
3 tests completed, 3 failed
There were failing tests. See the report at:
file:///usr/local/google/home/suztomo/beam/sdks/java/io/hcatalog/build/reports/tests/test/index.html
Deprecated Gradle features were used in this build, making it incompatible
with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See
https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 2m 52s
49 actionable tasks: 49 executed
suztomo@suztomo:~/beam$
```
Found ignoreFailures in the build.gradle:
```
test {
// TODO: Get tests to run. Known issues:
// * calcite-avatica bundles w/o repackaging Jackson (CALCITE-1110)
// * hive-exec bundles w/o repackaging Guava (HIVE-13690)
ignoreFailures true
}
```
Turning it off.
# TestRuntimeClasspath
https://gist.github.com/suztomo/63d6104d054d80370cd9e34f64e4d13e
As per IntelliJ, `org.apache.logging.log4j:log4j-core:2.13.3` holds
`org.apache.logging.log4j.util.ReflectionUtil`. The artifact appears in the
dependency graph:
```
+--- org.apache.hive.hcatalog:hive-hcatalog-core:2.1.0
| +--- org.apache.hive:hive-cli:2.1.0
| | +--- org.apache.hive:hive-common:2.1.0
| | | +--- org.apache.hive:hive-shims:2.1.0
...
| | | +--- org.apache.logging.log4j:log4j-1.2-api:2.4.1
| | | | +--- org.apache.logging.log4j:log4j-api:2.4.1 -> 2.13.3
| | | | \--- org.apache.logging.log4j:log4j-core:2.4.1 -> 2.13.3
| | | | \--- org.apache.logging.log4j:log4j-api:2.13.3
| | | +--- org.apache.logging.log4j:log4j-web:2.4.1
| | | | +--- org.apache.logging.log4j:log4j-api:2.4.1 -> 2.13.3
| | | | \--- org.apache.logging.log4j:log4j-core:2.4.1 -> 2.13.3
(*)
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 507758)
Time Spent: 3h 40m (was: 3.5h)
> Update log4j to version 2.13.3
> ------------------------------
>
> Key: BEAM-11055
> URL: https://issues.apache.org/jira/browse/BEAM-11055
> Project: Beam
> Issue Type: Improvement
> Components: build-system, io-java-elasticsearch
> Reporter: Ismaël Mejía
> Assignee: Ismaël Mejía
> Priority: P2
> Time Spent: 3h 40m
> Remaining Estimate: 0h
>
> Beam uses a version of log4j that is reported by some security tools to have
> some security issues. Notice that Beam's use of log4j should not be impacted
> by the issue.
> See [https://nvd.nist.gov/vuln/detail/CVE-2017-5645]
> The update in the vendored grpc module is to ensure it gets updated too in a
> future release of our vendored dependencies. Notice that this is a runtime
> dep for users so they are free to provide their own version so less of an
> issue.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)