Build 线程“main”java.lang.NoSuchMethodError中的Oozie异常:org.apache.log4j.config.PropertySetter.activate()V

Build 线程“main”java.lang.NoSuchMethodError中的Oozie异常:org.apache.log4j.config.PropertySetter.activate()V,build,log4j,oozie,nosuchmethoderror,Build,Log4j,Oozie,Nosuchmethoderror,我正在用docker集装箱建造oozie。但在成功构建Oozie二进制文件后运行以下命令时,我遇到了java.lang.NoSuchMethodError: oozie-setup.sh sharelib create -fs oozie 整个错误日志是: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/oozie-5.2.0/lib/log4j-slf4j-i

我正在用docker集装箱建造oozie。但在成功构建Oozie二进制文件后运行以下命令时,我遇到了java.lang.NoSuchMethodError:

oozie-setup.sh sharelib create -fs oozie
整个错误日志是:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/oozie-5.2.0/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/oozie-5.2.0/lib/slf4j-log4j12-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Found Hadoop that does not support Erasure Coding. Not taking any action.
the destination path for sharelib is: /user/root/share/lib/lib_20200224021814
root@382e4470c678:/# ooziedb.sh create -sqlfile oozie.sql -run

Validate DB Connection
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/oozie-5.2.0/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/oozie-5.2.0/lib/slf4j-log4j12-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.log4j.config.PropertySetter.activate()V
    at org.apache.log4j.PropertyConfigurator.parseAppenderFilters(PropertyConfigurator.java:923)
    at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:845)
    at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
    at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:672)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:516)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:395)
    at org.apache.log4j.PropertyWatchdog.doOnChange(PropertyConfigurator.java:955)
    at org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:89)
    at org.apache.log4j.helpers.FileWatchdog.<init>(FileWatchdog.java:58)
    at org.apache.log4j.PropertyWatchdog.<init>(PropertyConfigurator.java:947)
    at org.apache.log4j.PropertyConfigurator.configureAndWatch(PropertyConfigurator.java:473)
    at org.apache.oozie.service.XLogService.init(XLogService.java:177)
    at org.apache.oozie.service.Services.setServiceInternal(Services.java:387)
    at org.apache.oozie.service.Services.<init>(Services.java:111)
    at org.apache.oozie.tools.OozieDBCLI.getJdbcConf(OozieDBCLI.java:173)
    at org.apache.oozie.tools.OozieDBCLI.createConnection(OozieDBCLI.java:915)
    at org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:923)
    at org.apache.oozie.tools.OozieDBCLI.createDB(OozieDBCLI.java:192)
    at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:135)
    at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:83)
对于entrypoint.sh:

echo "<!-- OOZIE -->
<property>
  <name>hadoop.proxyuser.root.hosts</name>
  <value>*</value>
</property>
<property>
  <name>hadoop.proxyuser.root.groups</name>
  <value>*</value>
</property>" >> $OOZIE_HOME/conf/hadoop-conf/core-site.xml

oozie-setup.sh
oozie-setup.sh sharelib create -fs hdfs://namenode:8020
ooziedb.sh create -sqlfile oozie.sql -run
oozied.sh run
有什么想法吗?

因为Log4j2和Log4j冲突,所以删除oozie/lib中的所有Log4j2包

例如:

log4j-1.2-api-2.6.2.jar log4j-api-2.6.2.jar log4j-core-2.6.2.jar log4j-slf4j-impl-2.6.2.jar log4j-web-2.6.2.jar

echo "<!-- OOZIE -->
<property>
  <name>hadoop.proxyuser.root.hosts</name>
  <value>*</value>
</property>
<property>
  <name>hadoop.proxyuser.root.groups</name>
  <value>*</value>
</property>" >> $OOZIE_HOME/conf/hadoop-conf/core-site.xml

oozie-setup.sh
oozie-setup.sh sharelib create -fs hdfs://namenode:8020
ooziedb.sh create -sqlfile oozie.sql -run
oozied.sh run