alibaba / alibaba/DataX

关于找不到FastDateFormat方法的jar包冲突

Open
#452 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
17.4k
Forks
5.7k
PR merge metrics
No merged PRs in 30d

Description

使用mysql->hive导数据的时候,其中包含mysql中char类型的日期字段转换成hive中的timestamp类型,导入过程中出现了以下错误:java.lang.NoSuchMethodError:org.apache.commons.lang3.time.FastDateFormat.parse(Ljava/lang/String;)Ljava/util/Date;
一开始以为是lang和lang3的问题,解决了它们之间的矛盾之后,还有这个错误存在。
于是我认为错误可能是:hive-exec和lang3包中有同名类FastDateFormat,启动先加载了hive-exec的FastDateFormat类,该类中无parse方法,所以报错。
有人遇到同样的问题吗?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the mysql-to-Hive import for a MySQL char date converted to a timestamp. Inspect the runtime classpath and dependency versions for hive-exec and commons-lang3, focusing on which FastDateFormat class is loaded. Done means the import no longer raises the reported NoSuchMethodError.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mysql
Domain
data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.