我在 Azure 数据工厂的自托管集成运行时中遇到错误,特别是java.lang.NoClassDefFoundError:org/apache/log4j/Level
. 这是 ADF 生成的完整错误:
Operation on target QCR Load failed: Operation on target Copy failed: ErrorCode=ParquetJavaInvocationException,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=An error occurred when invoking java, message: java.lang.NoClassDefFoundError:org/apache/log4j/Level
total entry:13
org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
org.apache.parquet.Log.<init>(Log.java:62)
org.apache.parquet.Log.getLog(Log.java:56)
org.apache.parquet.filter2.compat.FilterCompat.<clinit>(FilterCompat.java:43)
org.apache.parquet.hadoop.ParquetReader$Builder.<init>(ParquetReader.java:174)
org.apache.parquet.hadoop.ParquetReader$Builder.<init>(ParquetReader.java:164)
org.apache.parquet.hadoop.ParquetReader.builder(ParquetReader.java:161)
com.microsoft.datatransfer.bridge.parquet.ParquetBatchReaderBridge.open(ParquetBatchReaderBridge.java:62)
com.microsoft.datatransfer.bridge.parquet.ParquetFileBridge.createReader(ParquetFileBridge.java:22)
java.lang.ClassNotFoundException:org.apache.log4j.Level
total entry:17
java.net.URLClassLoader.findClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
org.apache.parquet.Log.<init>(Log.java:62)
org.apache.parquet.Log.getLog(Log.java:56)
org.apache.parquet.filter2.compat.FilterCompat.<clinit>(FilterCompat.java:43)
org.apache.parquet.hadoop.ParquetReader$Builder.<init>(ParquetReader.java:174)
org.apache.parquet.hadoop.ParquetReader$Builder.<init>(ParquetReader.java:164)
org.apache.parquet.hadoop.ParquetReader.builder(ParquetReader.java:161)
com.microsoft.datatransfer.bridge.parquet.ParquetBatchReaderBridge.open(ParquetBatchReaderBridge.java:62)
com.microsoft.datatransfer.bridge.parquet.ParquetFileBridge.createReader(ParquetFileBridge.java:22)
.,Source=Microsoft.DataTransfer.Richfile.ParquetTransferPlugin,''Type=Microsoft.DataTransfer.Richfile.JniExt.JavaBridgeException,Message=,Source=Microsoft.DataTransfer.Richfile.HiveOrcBridge,'
特别是在对 Parquet 文件执行复制活动时。
我可以看到 log4j jar 在 Integration Runtime Jars 目录中:
除了建议以下内容的Informatica 片段外,我还没有找到任何好的文档:
Informatica Data Replication (IDR) 使用了 3 个 lo4j*.jar 文件,如下所示:
- log4j-1.2.16.jar
- log4jdbc3-1.2beta2.jar
- log4jdbc4-1.2beta2.jar
要解决此问题,请确保 DBSYNC_HOME\lib 目录中的三个 Java 文件可用,然后重新运行 IDR 控制台。
有没有人遇到过这个错误?我在自托管机器上运行 Microsoft Integration Runtime v5.0。我认为 slf4j-log4j12-1.7.5 会涵盖这种依赖关系,我错过了什么吗?