You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2021/12/11 23:42:00 UTC
[jira] [Comment Edited] (CALCITE-4935) Avatica standalone-server shades log4j without relocation
[ https://issues.apache.org/jira/browse/CALCITE-4935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17457771#comment-17457771 ]
Stamatis Zampetakis edited comment on CALCITE-4935 at 12/11/21, 11:41 PM:
--------------------------------------------------------------------------
The problem is that simply adding back similar lines for log4j2 does not seem to work. I tried adding the following to the relocation list:
"org.apache.logging",
"org.slf4j"
or
"org.apache.logging.log4j",
"org.slf4j"
but then when I run the standalone-server I get the following error:
{noformat}
java -jar avatica-standalone-server-1.20.0-SNAPSHOT-shadow.jar -u "jdbc:super://localhost"
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
{noformat}
The relocations does take place cause I checked the content of the jar but something goes wrong at runtime.
was (Author: zabetak):
The problem is that simply adding back similar lines for log4j2 does not seem to work. I tried adding the following to the relocation list:
"org.apache.logging",
"org.slf4j"
or
"org.apache.logging.log4j",
"org.slf4j"
but then when I run the standalone-server I get the following error:
{noformat}
java -jar avatica-standalone-server-1.20.0-SNAPSHOT-shadow.jar -u "jdbc:super://localhost"
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
{noformat}
> Avatica standalone-server shades log4j without relocation
> ---------------------------------------------------------
>
> Key: CALCITE-4935
> URL: https://issues.apache.org/jira/browse/CALCITE-4935
> Project: Calcite
> Issue Type: Bug
> Components: avatica
> Reporter: Stamatis Zampetakis
> Assignee: Stamatis Zampetakis
> Priority: Major
> Fix For: avatica-1.20.0
>
> Attachments: screenshot-1.png
>
>
> The issue has been found during the vote for avatica-1.20.0 RC0.
> The standalone-server jar in the [staged maven repository|https://repository.apache.org/content/repositories/orgapachecalcite-1122/org/apache/calcite/avatica/avatica-standalone-server/1.20.0/avatica-standalone-server-1.20.0.jar] contains log4j2 classes but they are not relocated.
> In previous, Avatica versions (e.g., avatica-1.19.0), log4j classes were all relocated to avoid classpath problems with other libraries/apps potentially using another log4j2 version.
> It seems that relocation was dropped in possibly unintenionally in CALCITE-4152.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)