This seems to be a duplicate of an earlier thread. Please only respond
there.

On Mon, Jul 5, 2021 at 4:05 PM Yuval Itzchakov <yuva...@gmail.com> wrote:

> Hi,
>
> I am attempting to upgrade Flink from 1.9 to 1.13.1
> I am using a YAML based log4j file. In 1.9, it worked perfectly fine by
> adding the following dependency to the classpath (I deploy with an uber
> JAR):
>
> "com.fasterxml.jackson.dataformat" % "jackson-dataformat-yaml" % "2.12.3"
>
> However, with Flink 1.13.1 I get the following error at runtime (only when
> running in a Cluster, running locally works fine):
>
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager [Fatal Error] log4j2.yaml:1:1: Content is not allowed in prolog.
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager ERROR StatusLogger Error parsing /opt/foo/conf/log4j2.yaml
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager org.xml.sax.SAXParseException; systemId:
> file:///opt/foo/conf/log4j2.yaml; lineNumber: 1; columnNumber: 1; Content
> is not allowed in prolog.
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:261)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.<init>(XmlConfiguration.java:92)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:458)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:385)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:293)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:647)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:668)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:253)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.LogManager.getContext(LogManager.java:155)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:45)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:48)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:329)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:349)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager at
> org.apache.flink.runtime.util.bash.BashJavaUtils.<clinit>(BashJavaUtils.java:45)
> flink-aamtr-a11e58230095d9390e8547eccb0290d4-27ef11e7-tm-6r8dfx
> taskmanager ERROR StatusLogger No logging configuration
>
> This indicates that for some reason, the jackson dataformat YAML library
> is not getting properly loaded from my uber JAR at runtime.
>
> Has anyone run into this? Any possible workarounds?
>

Reply via email to