You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2021/12/10 13:05:00 UTC
[jira] [Commented] (LOG4J2-3205) OutputStreamManager.flushBuffer throw NoSuchMethodError ByteBuffer.clear
[ https://issues.apache.org/jira/browse/LOG4J2-3205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17457136#comment-17457136 ]
Gary D. Gregory commented on LOG4J2-3205:
-----------------------------------------
You MUST use Java 8 to target Java 8 in this case because Java changed some definitions from version 8 to 9. You will also need Java 9 or 11 in your Maven toolchain file.
> OutputStreamManager.flushBuffer throw NoSuchMethodError ByteBuffer.clear
> ------------------------------------------------------------------------
>
> Key: LOG4J2-3205
> URL: https://issues.apache.org/jira/browse/LOG4J2-3205
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Reporter: dingjsh
> Priority: Major
> Attachments: image-2021-12-10-20-52-45-490.png, image-2021-12-10-20-53-34-503.png, image-2021-12-10-20-54-02-134.png
>
>
> Using mvn with jdk9, the compiled sources would throw NoSuchMethodError ByteBuffer.clear when running in a jdk1.8 env.
> if change the pom.xml, using <maven.compiler.release>8</maven.compiler.release> instead of the orginal maven.compiler.source and maven.compiler.target,it would solve the problem.
>
> !image-2021-12-10-20-52-45-490.png!
> !image-2021-12-10-20-53-34-503.png!
> !image-2021-12-10-20-54-02-134.png!
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)