java.lang.NoSuchMethodError: org.apache.logging.log4j.Logger.info #1058
-
I'm using hive hive (default)> ADD JAR hdfs:///user/abc/yauaa-hive-7.19.2-SNAPSHOT-udf.jar;
converting to local hdfs:///user/abc/yauaa-hive-7.19.2-SNAPSHOT-udf.jar
Added [/mnt/hive/tmp/319e971b-0c54-46c2-803d-26c64f48c962_resources/yauaa-hive-7.19.2-SNAPSHOT-udf.jar] to class path
Added resources: [hdfs:///user/abc/yauaa-hive-7.19.2-SNAPSHOT-udf.jar]
hive (default)> CREATE FUNCTION ParseUserAgent_v3
> AS 'nl.basjes.parse.useragent.hive.ParseUserAgent'
> USING JAR 'hdfs:///user/abc/yauaa-hive-7.19.2-SNAPSHOT-udf.jar';
converting to local hdfs:///user/abc/yauaa-hive-7.19.2-SNAPSHOT-udf.jar
Added [/mnt/hive/tmp/319e971b-0c54-46c2-803d-26c64f48c962_resources/yauaa-hive-7.19.2-SNAPSHOT-udf.jar] to class path
Added resources: [hdfs:///user/abc/yauaa-hive-7.19.2-SNAPSHOT-udf.jar]
hive (default)> select parseuseragent_v3('Mozilla/5.0 (Linux\; Android 6.0\; Nexus 6 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36');
Exception in thread "de12ba54-5bd7-4f94-bd39-9291652b4e12 main" java.lang.NoSuchMethodError: org.apache.logging.log4j.Logger.info(Ljava/lang/String;Ljava/lang/Object;)V
at nl.basjes.parse.useragent.utils.YauaaVersion.logVersion(YauaaVersion.java:129)
at nl.basjes.parse.useragent.utils.YauaaVersion.logVersion(YauaaVersion.java:109)
at nl.basjes.parse.useragent.utils.YauaaVersion.logVersion(YauaaVersion.java:102)
at nl.basjes.parse.useragent.AbstractUserAgentAnalyzerDirect$AbstractUserAgentAnalyzerDirectBuilder.build(AbstractUserAgentAnalyzerDirect.java:545)
at nl.basjes.parse.useragent.AbstractUserAgentAnalyzer$AbstractUserAgentAnalyzerBuilder.build(AbstractUserAgentAnalyzer.java:339)
at nl.basjes.parse.useragent.hive.ParseUserAgent.lambda$static$0(ParseUserAgent.java:85)
at java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:305)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:195)
at java.lang.ThreadLocal.get(ThreadLocal.java:172)
at nl.basjes.parse.useragent.hive.ParseUserAgent.initialize(ParseUserAgent.java:114)
at org.apache.hadoop.hive.ql.udf.generic.GenericUDF.initializeAndFoldConstants(GenericUDF.java:139)
at org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc.newInstance(ExprNodeGenericFuncDesc.java:230)
at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.getXpathOrFuncExprNodeDesc(TypeCheckProcFactory.java:1097)
at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.process(TypeCheckProcFactory.java:1316)
at org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90)
at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:105)
at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:89)
at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(DefaultGraphWalker.java:158)
at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:120)
at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:213)
at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:157)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genAllExprNodeDesc(SemanticAnalyzer.java:10519)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:10475)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genSelectPlan(SemanticAnalyzer.java:3843)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genSelectPlan(SemanticAnalyzer.java:3622)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPostGroupByBodyPlan(SemanticAnalyzer.java:8895)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:8850)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9703)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9596)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:10092)
at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:353)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10103)
at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:228)
at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:239)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:473)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:319)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1249)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1295)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1178)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1166)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:236)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:187)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:403)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:782)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:721)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:648)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:244)
at org.apache.hadoop.util.RunJar.main(RunJar.java:158) hive is having below logging lib
can anyone guide me on this what needs to be done in order to tix this? Also, how do I maintain this library for my hive and hadoop versions ? ( will test run respective of my hive and hadoop versions when we change in respective versions pom.xml ? ) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
Few things I noticed:
|
Beta Was this translation helpful? Give feedback.
-
Since you are already building it yourself perhaps making these changes to the sources helps in your case:
|
Beta Was this translation helpful? Give feedback.
Curious to hear if this hack works on your machine
https://github.com/nielsbasjes/yauaa/tree/HiveLog4jDependencies