[
https://issues.apache.org/jira/browse/HIVE-23700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18088603#comment-18088603
]
Allan Espinosa commented on HIVE-23700:
---------------------------------------
||hive-exec version||Result||
|3.1| ❌Occurs and aborts|
|4.2|✅ Occurs but proceeds|
This is the output when I uber-jar'ed hive-exec:4.2.0 with Spring Boot 4.2. As
you can see the stacktrace is still occurring but it proceeds to the next step
but reports "Found configuration file null"
{code}
2026-06-12T17:27:46.627Z INFO 400228 --- [ main]
org.apache.hadoop.hive.conf.HiveConf : Found configuration file null
2026-06-12T17:27:46.628Z INFO 400228 --- [ main]
org.apache.hadoop.hive.conf.HiveConf : Cannot get jar URI
java.lang.IllegalArgumentException: URI scheme is not "file"
at java.base/java.io.File.<init>(File.java:423) ~[na:na]
at
org.apache.hadoop.hive.conf.HiveConf.findConfigFile(HiveConf.java:228)
~[hive-exec-4.2.0.jar!/:4.2.0]
at org.apache.hadoop.hive.conf.HiveConf.<clinit>(HiveConf.java:202)
~[hive-exec-4.2.0.jar!/:4.2.0]
at com.bloomberg.hadoop.hive.Hive42$HiveTest.run(Hive42.java:27)
~[!/:na]
at
org.springframework.boot.SpringApplication.lambda$callRunner$1(SpringApplication.java:792)
~[spring-boot-4.1.0.jar!/:4.1.0]
at
org.springframework.util.function.ThrowingConsumer$1.acceptWithException(ThrowingConsumer.java:82)
~[spring-core-7.0.8.jar!/:7.0.8]
at
org.springframework.util.function.ThrowingConsumer.accept(ThrowingConsumer.java:60)
~[spring-core-7.0.8.jar!/:7.0.8]
at
org.springframework.util.function.ThrowingConsumer$1.accept(ThrowingConsumer.java:86)
~[spring-core-7.0.8.jar!/:7.0.8]
at
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800)
~[spring-boot-4.1.0.jar!/:4.1.0]
at
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:791)
~[spring-boot-4.1.0.jar!/:4.1.0]
at
org.springframework.boot.SpringApplication.lambda$callRunners$0(SpringApplication.java:776)
~[spring-boot-4.1.0.jar!/:4.1.0]
at
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
~[na:na]
at
java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
~[na:na]
at
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
~[na:na]
at
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
~[na:na]
at
java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
~[na:na]
at
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
~[na:na]
at
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
~[na:na]
at
java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
~[na:na]
at
org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:776)
~[spring-boot-4.1.0.jar!/:4.1.0]
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:328)
~[spring-boot-4.1.0.jar!/:4.1.0]
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1365)
~[spring-boot-4.1.0.jar!/:4.1.0]
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
~[spring-boot-4.1.0.jar!/:4.1.0]
at com.bloomberg.hadoop.hive.Hive42.main(Hive42.java:18) ~[!/:na]
at
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
at
org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:106)
~[hive42-0.1.0.jar:na]
at
org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64)
~[hive42-0.1.0.jar:na]
at
org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40)
~[hive42-0.1.0.jar:na]
Cannot get jar URI: URI scheme is not "file"
2026-06-12T17:27:46.628Z INFO 400228 --- [ main]
org.apache.hadoop.hive.conf.HiveConf : Found configuration file null
2026-06-12T17:27:47.981Z WARN 400228 --- [ main]
o.a.h.hive.ql.exec.FunctionRegistry : UDF Class
org.apache.hadoop.hive.ql.udf.generic.GenericUDFToJson does not have
description. Please annotate the class with the
org.apache.hadoop.hive.ql.exec.Description annotation and provide the
description of the function.
{code}
The HiveConf object seem to have been initalized properly as I am able to use
it to connect to the Hive Metastore and do queries like listing my Hive tables.
> HiveConf static initialization fails when JAR URI is opaque
> -----------------------------------------------------------
>
> Key: HIVE-23700
> URL: https://issues.apache.org/jira/browse/HIVE-23700
> Project: Hive
> Issue Type: Bug
> Components: Hive
> Affects Versions: 2.3.7
> Reporter: Francisco Guerrero
> Assignee: Francisco Guerrero
> Priority: Minor
> Labels: pull-request-available
> Attachments: HIVE-23700.1.patch
>
> Original Estimate: 120h
> Time Spent: 2h
> Remaining Estimate: 118h
>
> HiveConf static initialization fails when the jar URI is opaque, for example
> when it's embedded as a fat jar in a spring boot application. Then
> initialization of the HiveConf static block fails and the HiveConf class does
> not get classloaded. The opaque URI in my case looks like this
> _jar:file:/usr/local/server/some-service-jar.jar!/BOOT-INF/lib/hive-common-2.3.7.jar!/_
> HiveConf#findConfigFile should be able to handle `IllegalArgumentException`
> when the jar `URI` provided to `File` throws the exception.
> To surface this issue three conditions need to be met.
> 1. hive-site.xml should not be on the classpath
> 2. hive-site.xml should not be on "HIVE_CONF_DIR"
> 3. hive-site.xml should not be on "HIVE_HOME"
--
This message was sent by Atlassian Jira
(v8.20.10#820010)