alibaba / alibaba/DataX

Can't find bundle for base name com.alibaba.datax.common.util.LocalStrings, locale zh_CN

Open
#1,789 7 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

java项目使用datax进行采集的时候,windows本地可以正常采集,部署到linux服务器上(使用docker部署)会报如下错误。datax的jar包是该项目的master分支上的代码。
日志信息:
2023-05-18 15:53:06.010 - INFO classification-grading-service [com.croot.classification.grading.service.controller.SysCollectDataController_lambda$fetchDbCollect$0] - datax采集的配置信息,["-job","datax/datax/mysql_postgre.json","-mode","standalone","-jobid","-1"]
2023-05-18 15:53:06.147 - INFO classification-grading-service [com.alibaba.datax.common.util.MessageSource_init] - JVM TimeZone: GMT+08:00, Locale: zh_CN
2023-05-18 15:53:06.148 - INFO classification-grading-service [com.alibaba.datax.common.util.MessageSource_setEnvironment] - use Locale: zh_CN timeZone: sun.util.calendar.ZoneInfo[id="GMT+08:00",offset=28800000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
2023-05-18 15:53:06.152 - ERROR classification-grading-service [com.croot.classification.grading.service.controller.SysCollectDataController_lambda$fetchDbCollect$0] - Can't find bundle for base name com.alibaba.datax.common.util.LocalStrings, locale zh_CN

报错信息:
java.util.MissingResourceException: Can't find bundle for base name com.alibaba.datax.common.util.LocalStrings, locale zh_CN
at java.base/java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2055)
at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1689)
at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1593)
at java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:1284)
at com.alibaba.datax.common.util.MessageSource.loadResourceBundle(MessageSource.java:92)
at com.alibaba.datax.common.util.MessageSource.loadResourceBundle(MessageSource.java:37)
at com.alibaba.datax.common.util.MessageSource.loadResourceBundle(MessageSource.java:46)
at com.alibaba.datax.common.util.MessageSource.reloadResourceBundle(MessageSource.java:117)
at com.alibaba.datax.core.Engine.entry(Engine.java:134)
at com.croot.classification.grading.service.controller.SysCollectDataController.lambda$fetchDbCollect$0(SysCollectDataController.java:180)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1728)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with com.alibaba.datax.common.util.MessageSource.java, especially loadResourceBundle, and the Engine.entry call shown in the stack trace. Inspect the master-branch JAR and its Docker/Linux runtime for the LocalStrings resource under the expected base name, then reproduce the zh_CN launch; done means the bundle loads successfully in that environment without MissingResourceException.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
backend, devops
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.