This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/main by this push:
     new 7ecda8d0a ORC-2069: Fix convert tool failed to read csv
7ecda8d0a is described below

commit 7ecda8d0a2717f24c02215925927e69fff72732a
Author: sychen <[email protected]>
AuthorDate: Fri Jan 30 14:37:54 2026 +0900

    ORC-2069: Fix convert tool failed to read csv
    
    ### What changes were proposed in this pull request?
    This PR aims to fix convert tool failed to read csv.
    
    ### Why are the changes needed?
    
    `orc-tools-2.2.2-uber.jar` is not packaged `commons-lang3`, which causes 
its convert command to fail to read csv.
    
    ```java
    Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/orc/shade/commons/lang3/ObjectUtils
            at com.opencsv.CSVParser.<init>(CSVParser.java:110)
            at com.opencsv.CSVParserBuilder.build(CSVParserBuilder.java:139)
            at org.apache.orc.tools.convert.CsvReader.<init>(CsvReader.java:89)
            at 
org.apache.orc.tools.convert.ConvertTool$FileInformation.getRecordReader(ConvertTool.java:162)
            at 
org.apache.orc.tools.convert.ConvertTool.run(ConvertTool.java:221)
            at 
org.apache.orc.tools.convert.ConvertTool.main(ConvertTool.java:174)
            at org.apache.orc.tools.Driver.main(Driver.java:118)
    Caused by: java.lang.ClassNotFoundException: 
org.apache.orc.shade.commons.lang3.ObjectUtils
            at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
            at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)
            ... 7 more
    ```
    
    ### How was this patch tested?
    local test
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No
    
    Closes #2504 from cxzl25/ORC-2069.
    
    Authored-by: sychen <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 java/tools/pom.xml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/java/tools/pom.xml b/java/tools/pom.xml
index 199b7968f..e22f3eb37 100644
--- a/java/tools/pom.xml
+++ b/java/tools/pom.xml
@@ -56,6 +56,12 @@
         </exclusion>
       </exclusions>
     </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+      <!-- convert tool CSVParser uses org.apache.commons.lang3 -->
+      <scope>runtime</scope>
+    </dependency>
     <dependency>
       <groupId>commons-cli</groupId>
       <artifactId>commons-cli</artifactId>

Reply via email to